Skip to content

Format output with goimports (golang.org/x/tools/imports) #255

Open
@colega

Description

@colega

Issue

The go/format package doesn't sort the imports in the canonical form, like goimports does, which causes the autogenerated files by this tool being changed by the goimports tool (or failing the CI if goimports format is enforced there)

Proposal

Use more strict golang.org/x/tools/imports package for formatting the output, like mockery does, for example, which would format also the imports and still produce a gofmt-compatible output.

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