gojay icon indicating copy to clipboard operation
gojay copied to clipboard

gojay generated code doesn't work for type names starting with K

Open bramp opened this issue 4 years ago • 0 comments

When generating code with gojay, it does not support types starting with K. For example:

type Key struct {...}

generates the code:

func (k *Key) UnmarshalJSONObject(dec *gojay.Decoder, k string) error {
...
}

This doesn't compile, since both the alias and a argument use the same variable, k.

bramp avatar Apr 17 '21 22:04 bramp