[go]: fix anyOf compilation error (#10431)

This commit is contained in:
Andrew 2021-09-21 07:01:35 +03:00 committed by GitHub
parent a939676c0d
commit 61852a072a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,7 +20,7 @@ func (dst *{{classname}}) UnmarshalJSON(data []byte) error {
{{#-first}}
// use discriminator value to speed up the lookup
var jsonDict map[string]interface{}
err := json.Unmarshal(data, &jsonDict)
err = json.Unmarshal(data, &jsonDict)
if err != nil {
return fmt.Errorf("Failed to unmarshal JSON into map for the discriminator lookup.")
}