fixed new line issue

This commit is contained in:
Neil O'Toole 2016-05-02 15:53:19 +01:00
parent 5fdf615de7
commit 803c62e0dc
3 changed files with 5 additions and 3 deletions

View File

@ -102,7 +102,8 @@ func (a {{classname}}) {{nickname}}({{#allParams}}{{paramName}} {{{dataType}}}{{
{{#headerParams}} // header params "{{baseName}}"
headerParams["{{baseName}}"] = {{paramName}}
{{/headerParams}}{{/hasHeaderParams}}{{#hasFormParams}}
{{#formParams}}{{#isFile}} fbs, _ := ioutil.ReadAll(file)
{{#formParams}}{{#isFile}}
fbs, _ := ioutil.ReadAll(file)
fileBytes = fbs
fileName = file.Name(){{/isFile}}
{{^isFile}} formParams["{{paramName}}"] = {{paramName}}{{/isFile}}{{/formParams}}{{/hasFormParams}}{{#hasBodyParam}}

View File

@ -7,7 +7,7 @@ This API client was generated by the [swagger-codegen](https://github.com/swagge
- API version: 1.0.0
- Package version: 1.0.0
- Build date: 2016-05-01T14:37:06.925+01:00
- Build date: 2016-05-02T15:51:26.331+01:00
- Build package: class io.swagger.codegen.languages.GoClientCodegen
## Installation

View File

@ -551,7 +551,8 @@ func (a PetApi) UploadFile(petId int64, additionalMetadata string, file *os.File
headerParams["Accept"] = localVarHttpHeaderAccept
}
formParams["additionalMetadata"] = additionalMetadata fbs, _ := ioutil.ReadAll(file)
formParams["additionalMetadata"] = additionalMetadata
fbs, _ := ioutil.ReadAll(file)
fileBytes = fbs
fileName = file.Name()