gzuidhof / tygo

Generate Typescript types from Golang source code
MIT License
574 stars 39 forks source link

When both yaml and json tags are present (with differing configuration), yaml takes precedence, cannot be changed #54

Open AnalogJ opened 3 months ago

AnalogJ commented 3 months ago

I have a struct that looks like:

type Example struct {
    ItemId  string `json:"item_id,omitempty" yaml:"-"`
}

When generating using tygo, the ItemId field is always ignored (not present in the final generated .ts file). It seems that yaml tags override json tags.

gzuidhof commented 2 months ago

Hmm, happy to accept a PR that fixes this - I'd say this is a bug.