From 61852a072a88b4f07c7ded41ad4a0b0fbe9be7df Mon Sep 17 00:00:00 2001 From: Andrew Date: Tue, 21 Sep 2021 07:01:35 +0300 Subject: [PATCH] [go]: fix anyOf compilation error (#10431) --- .../src/main/resources/go/model_anyof.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/resources/go/model_anyof.mustache b/modules/openapi-generator/src/main/resources/go/model_anyof.mustache index 5bdefe2a9e2..f1d8c57c85f 100644 --- a/modules/openapi-generator/src/main/resources/go/model_anyof.mustache +++ b/modules/openapi-generator/src/main/resources/go/model_anyof.mustache @@ -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.") }