typesense / typesense/typesense-go

Nested structs in type_gen should not be anonymous structs

Open
#154 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
319
Forks
73
PR merge metrics
No merged PRs in 30d

Description

see: https://github.com/typesense/typesense-go/blob/4d2cad02695cd09c26543af066a1219de1522b2f/typesense/api/types_gen.go#L153

Nested structs should not be anonymous structs, as this makes it so the caller needs to define the struct manually in order to pass it in as an argument to the function.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at typesense/api/types_gen.go around line 153 and trace how the nested anonymous struct is generated. Identify the relevant generated type definitions and verify the public function argument shape; done means callers can use named nested types without manually reproducing an anonymous struct.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.