gzuidhof / tygo

Generate Typescript types from Golang source code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

AnalogJ opened this issue · comments

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.

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