github mvdan/gofumpt v0.3.0

latest releases: v0.7.0, v0.6.0, v0.5.0...
2 years ago

This is gofumpt's third major release, based on Go 1.18's gofmt. The jump from Go 1.17's gofmt should bring a noticeable speed-up, as the tool can now format many files concurrently. On an 8-core laptop, formatting a large codebase is 4x as fast.

The following formatting rules are added:

  • Functions should separate ) { where the indentation helps readability
  • Field lists should not have leading or trailing empty lines

The following changes are included as well:

  • Generated files are now fully formatted when given as explicit arguments
  • Prepare for Go 1.18's module workspaces, which could cause errors
  • Import paths sharing a prefix with the current module path are no longer grouped with standard library imports
  • format.Options gains a ModulePath field per the last bullet point

A special thanks to @Oiyoo for his recent contributions as well 🎉

Binaries built on go version go1.17.7 linux/amd64 via a shell script.

Consider becoming a sponsor if you benefit from the work that went into this release!

Don't miss a new gofumpt release

NewReleases is sending notifications on new releases.