easyjson icon indicating copy to clipboard operation
easyjson copied to clipboard

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

Open colega opened this issue 4 years ago • 0 comments

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.

colega avatar Oct 28 '19 13:10 colega