From e9303b459814df2f781e0812631836532063923d Mon Sep 17 00:00:00 2001 From: Andrew Brampton Date: Sat, 17 Apr 2021 15:51:32 -0700 Subject: [PATCH] Minor tweak to generated code to avoid variable name colission. --- gojay/codegen/template.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gojay/codegen/template.go b/gojay/codegen/template.go index 6b1ddb6..901552c 100644 --- a/gojay/codegen/template.go +++ b/gojay/codegen/template.go @@ -171,9 +171,9 @@ func ({{.Receiver}}) IsNil() bool { } // UnmarshalJSONObject implements gojay's UnmarshalerJSONObject -func ({{.Receiver}}) UnmarshalJSONObject(dec *gojay.Decoder, k string) error { +func ({{.Receiver}}) UnmarshalJSONObject(dec *gojay.Decoder, key string) error { {{.InitEmbedded}} - switch k { + switch key { {{.DecodingCases}} } return nil