Enforce a stricter format than gofmt, while being backwards compatible. That is, gofumpt is happy with a subset of the formats that gofmt is happy with.
The tool is a fork of gofmt as of Go 1.24.0, and requires Go 1.23 or later. It can be used as a drop-in replacement to format your Go code, and running gofmt after gofumpt should produce no changes.
This is free and open source software.
Website: github.com/mvdan/gofumpt
Support:
Developer: Daniel Martí
License: BSD 3-Clause “New” or “Revised” License
gofumpt is written in Go. Learn Go with our recommended free books and free tutorials.
Related Software
| Go Linters | |
|---|---|
| revive | Designed as a drop-in replacement for golint |
| golangci-lint | Fast Go linters runner |
| gosec | Security scanner for Go projects |
| Staticcheck | Advanced Go linter |
| go-critic | Opinionated Go source code linter |
| Vet | Examines Go source code and reports suspicious constructs |
| gofumpt | Stricter gofmt |
| gofmt | Formats Go programs |
| go-ruleguard | Analysis-based Go linter that runs dynamically loaded rules |
| forbidigo | Go linter for forbidding identifiers |
| godot | Keep source code comments consistent |
Read our verdict in the software roundup.
Explore our comprehensive directory of recommended free and open source software. Our carefully curated collection spans every major software category.This directory is part of our ongoing series of informative articles for Linux enthusiasts. It features hundreds of detailed reviews, along with open source alternatives to proprietary solutions from major corporations such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk. You’ll also find interesting projects to try, hardware coverage, free programming books and tutorials, and much more. Discovered a useful open source Linux program that we haven’t covered yet? Let us know by completing this form. |

