Skip to content

Commit 0ab08a1

Browse files
mraerinonomaster
andcommitted
[go] Fix undefined variable exception
Co-authored-by: Mic Szillat <[email protected]>
1 parent ffb3bda commit 0ab08a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/swagger-codegen/src/main/resources/go/api.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,8 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx context.Context{{#hasParams}
147147
{{#hasFormParams}}
148148
{{#formParams}}
149149
{{#isFile}}
150-
{{^required}}
151150
var localVarFile ({{dataType}})
151+
{{^required}}
152152
if localVarTempParam, localVarOk := localVarOptionals["{{paramName}}"].({{dataType}}); localVarOk {
153153
localVarFile = localVarTempParam
154154
}

0 commit comments

Comments
 (0)