Skip to content

[BUG][GO] generated go code not not formatted properly #4031

Description

@Fjolnir-Dvorak

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
    • generated sample code in ./samples/client/petstore/go/
  • Have you validated the input using an OpenAPI validator (example)?
  • What's the version of OpenAPI Generator used?
    • branch master date 2019-10-02 commit c136b83
  • Have you search for related issues/PRs?
  • What's the actual output vs expected output?
    • run go fmt on the generated code and view changes via git diff
  • [Optional] Bounty to sponsor the fix (example)
Description

The generated code does not follow the go coding standards (go fmt)

openapi-generator version

commit c136b83 (latest commit on master on 2019-10-02T15:27:00)

Steps to reproduce
cd ./samples/client/petstore/go
cd ./go-petstore
go fmt ./*
cd ../go-petstore-withXml
go fmt ./*
cd ../../../../server/petstore/go-gin-api-server
go fmt ./*
Suggest a fix

Correct all mustache templates and add a test for the build servers which runs "go fmt" and checks if there are any changed files. If yes, the test should fail.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions