From d45b18ada965d85bdf05d8f6d80511fc399d0c57 Mon Sep 17 00:00:00 2001 From: andrei kavalionak Date: Mon, 20 Sep 2021 13:04:18 +0300 Subject: [PATCH] [go]: fix anyOf compilation error --- .../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 5bdefe2a9e2e..f1d8c57c85ff 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.") }