easyjson
easyjson copied to clipboard
Format output with goimports (golang.org/x/tools/imports)
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.