Skip to content

v0.3.0

Compare
Choose a tag to compare
@mvdan mvdan released this 22 Feb 17:27
· 77 commits to master since this release

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!