# gofmt

26 Hacker News commenters recommended gofmt and 5 criticized it, November 2025 to November 2026. It was recommended in 10 of 13 months. It meets the Hacker Approved badge rule.

**Verdict:** Go's built-in formatter that ends style debates by enforcing one standard format with almost no settings. Critics say it does not break long lines and is not strict enough.

## Why people recommend it

- Widely loved by Go developers (5 comments): "gofmt’s style is nobody’s favorite, yet gofmt is everybody’s favorite." ([source](https://news.ycombinator.com/item?id=49057140)) "Gofmt's style is no one's favorite, yet gofmt is everyone's favorite." ([source](https://news.ycombinator.com/item?id=49369393)) "yet gofmt is everyone's favorite." ([source](https://news.ycombinator.com/item?id=50196980))
- Ends formatting debates and style discussions (4 comments): "The best part about gofmt is there is no discussion about how to format Go code." ([source](https://news.ycombinator.com/item?id=48022290)) "go kinda eliminates a lot of the reasons for style guides to exist w/ `go fmt`" ([source](https://news.ycombinator.com/item?id=46547139)) "enforcing the same style ends all of the drama" ([source](https://news.ycombinator.com/item?id=45788061))
- Opinionated with few knobs (4 comments): "modern opinionated tooling like gofmt, that does not come with hundreds to thousands of knobs" ([source](https://news.ycombinator.com/item?id=47738395)) "opinionated tooling like gofmt, that does not come with hundreds to thousands of knobs" ([source](https://news.ycombinator.com/item?id=47740420)) "I think gofmt works much better, and that's in large part because it tries to do less." ([source](https://news.ycombinator.com/item?id=45787406))
- Built into Go, satisfying to run (4 comments): "it's so satisfying to me when I just run "gofmt" and know the thing is formatted well." ([source](https://news.ycombinator.com/item?id=45785461)) "it's so satisfying to me when I just run "gofmt" and know the thing is formatted well" ([source](https://news.ycombinator.com/item?id=45786785)) "gofmt was somewhat revolutionary for being a built-in" ([source](https://news.ycombinator.com/item?id=49057673))

## What people warn about

- Not strict or opinionated enough (3 comments): "Gofmt is a great idea but it isn't strict enough for my taste." ([source](https://news.ycombinator.com/item?id=49056894)) "Gofmt is great but it's still not very strict" ([source](https://news.ycombinator.com/item?id=49056944)) "as gofmt is not opinionated enough" ([source](https://news.ycombinator.com/item?id=49059739))
- Does not break long lines (2 comments): "The most important task of a code formatter is to break long lines; it doesn't do it." ([source](https://news.ycombinator.com/item?id=49266689)) "It doesn't even have an option to do it!" ([source](https://news.ycombinator.com/item?id=49268810))

## Alternatives hackers recommend

- [Black](https://hackerapproved.com/p/black.md): 18 recommend
- [FracturedJson](https://hackerapproved.com/p/fracturedjson.md): 18 recommend
- [Prettier](https://hackerapproved.com/p/prettier.md): 16 recommend
- [Oxfmt](https://hackerapproved.com/p/oxfmt.md): 14 recommend
- [clang-format](https://hackerapproved.com/p/clang-format.md): 7 recommend

## Cite as

Hacker Approved, "gofmt", https://hackerapproved.com/p/gofmt/ (counts from 1,795,640 Hacker News comments, November 2025 to November 2026).
