{"slug": "gofmt", "name": "gofmt", "category": "other", "category_name": "Other software", "description": "", "recommenders": 3, "commenters": 7, "warners": 1, "score": 2.447, "rising": -0.98, "first": "2025-12-30", "latest": "2026-07-26", "why": "The best part about gofmt is there is no discussion about how to format Go code.", "why_is_quote": true, "has_verdict": false, "sentiment": {"recommend": 3, "neutral": 2, "compare": 1, "warn": 1}, "spark": [0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0], "listed": true, "loved": [], "caveat": "", "short_quote": "The best part about gofmt is there is no discussion about how to format Go code.", "kind": "", "icon": false, "domain": null, "github_repo": null, "official_url": "https://pkg.go.dev/cmd/gofmt", "pricing": "", "aliases": ["gofmt", "go fmt"], "verdict": null, "praise": [{"label": "", "summary": "", "quotes": [{"id": 784986800, "item_id": 49061675, "url": "https://news.ycombinator.com/item?id=49061675", "by": "OoooooooO", "date": "2026-07-26", "stance": "recommend", "quote": "I love gofmt, rustfmt, ruff.", "excerpt": "Same for rustfmt. I love gofmt, rustfmt, ruff.", "context": "", "use_case": "Code formatting", "switched_from": "", "story": "Ruff v0.16.0 \u2013 Significant new updates \u2013 413 default rules up from 59"}, {"id": 768356640, "item_id": 48022290, "url": "https://news.ycombinator.com/item?id=48022290", "by": "infogulch", "date": "2026-05-05", "stance": "recommend", "quote": "The best part about gofmt is there is no discussion about how to format Go code.", "excerpt": "The full quote: > Gofmt's style is no one's favorite, yet gofmt is everyone's favorite - Rob Pike https://go-proverbs.github.io/#:~:text=Gofmt%27s%20style%20is%20no%20one%27s%20favorite%2C%20yet%20gofmt%20is%20everyone%27s%20favorite. The best part about gofmt is there is no discussion about how to format Go code. The style itself is fine, skipping endless hours of pointless debate is priceless.", "context": "", "use_case": "Go code formatting", "switched_from": "", "story": "Formatting a 25M-line codebase overnight"}, {"id": 759603344, "item_id": 47475209, "url": "https://news.ycombinator.com/item?id=47475209", "by": "notepad0x90", "date": "2026-03-22", "stance": "recommend", "quote": "the right execution is in the style of 'go fmt' with Go", "excerpt": "we don't even use indents that way in natural language. We use things like bullet points, we need specific markers. space is for spacing, tabs are for tabulation, they are not in any human language I know of used as terminators of statements. You know what is the equivalent of an indent or a semicolon in english? a period. <- We have paragraph breaks just like this to delimit blocks of english statements. A semi-colo", "context": "", "use_case": "auto-formatting code", "switched_from": "", "story": "No Semicolons Needed"}]}], "caveats": [{"label": "", "summary": "", "quotes": [{"id": 784955824, "item_id": 49059739, "url": "https://news.ycombinator.com/item?id=49059739", "by": "CrompyBlompers", "date": "2026-07-26", "stance": "warn", "quote": "gofmt is not opinionated enough", "excerpt": "There's a ton of variation in golang code, as gofmt is not opinionated enough. As evidenced by the existence of golines[0] or gofumpt[1]. 0: https://github.com/golangci/golines/ 1: https://github.com/mvdan/gofumpt", "context": "", "use_case": "", "switched_from": "", "story": "Ruff v0.16.0 \u2013 Significant new updates \u2013 413 default rules up from 59"}]}], "who": [], "tags": [], "use_cases": ["code formatting", "go code formatting", "auto-formatting code", "auto-formatting go code"], "compared": [], "makers": [], "threads": [{"url": "https://news.ycombinator.com/item?id=49056112", "title": "Ruff v0.16.0 \u2013 Significant new updates \u2013 413 default rules up from 59", "mentions": 2}, {"url": "https://news.ycombinator.com/item?id=48014325", "title": "Formatting a 25M-line codebase overnight", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=47738094", "title": "JVM Options Explorer", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=47527590", "title": "Swift 6.3 Released", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=47470200", "title": "No Semicolons Needed", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=46431028", "title": "Go Away Python", "mentions": 1}], "sentiment_by_month": {"2025-11": {}, "2025-12": {"neutral": 1}, "2026-01": {}, "2026-02": {}, "2026-03": {"recommend": 1, "neutral": 1}, "2026-04": {"compare": 1}, "2026-05": {"recommend": 1}, "2026-06": {}, "2026-07": {"warn": 1, "recommend": 1}, "2026-08": {}, "2026-09": {}, "2026-10": {}}, "quotes": [{"id": 784986800, "item_id": 49061675, "url": "https://news.ycombinator.com/item?id=49061675", "by": "OoooooooO", "date": "2026-07-26", "stance": "recommend", "quote": "I love gofmt, rustfmt, ruff.", "excerpt": "Same for rustfmt. I love gofmt, rustfmt, ruff.", "context": "", "use_case": "Code formatting", "switched_from": "", "story": "Ruff v0.16.0 \u2013 Significant new updates \u2013 413 default rules up from 59"}, {"id": 784955824, "item_id": 49059739, "url": "https://news.ycombinator.com/item?id=49059739", "by": "CrompyBlompers", "date": "2026-07-26", "stance": "warn", "quote": "gofmt is not opinionated enough", "excerpt": "There's a ton of variation in golang code, as gofmt is not opinionated enough. As evidenced by the existence of golines[0] or gofumpt[1]. 0: https://github.com/golangci/golines/ 1: https://github.com/mvdan/gofumpt", "context": "", "use_case": "", "switched_from": "", "story": "Ruff v0.16.0 \u2013 Significant new updates \u2013 413 default rules up from 59"}, {"id": 768356640, "item_id": 48022290, "url": "https://news.ycombinator.com/item?id=48022290", "by": "infogulch", "date": "2026-05-05", "stance": "recommend", "quote": "The best part about gofmt is there is no discussion about how to format Go code.", "excerpt": "The full quote: > Gofmt's style is no one's favorite, yet gofmt is everyone's favorite - Rob Pike https://go-proverbs.github.io/#:~:text=Gofmt%27s%20style%20is%20no%20one%27s%20favorite%2C%20yet%20gofmt%20is%20everyone%27s%20favorite. The best part about gofmt is there is no discussion about how to format Go code. The style itself is fine, skipping endless hours of pointless debate is priceless.", "context": "", "use_case": "Go code formatting", "switched_from": "", "story": "Formatting a 25M-line codebase overnight"}, {"id": 763852017, "item_id": 47740751, "url": "https://news.ycombinator.com/item?id=47740751", "by": "layer8", "date": "2026-04-12", "stance": "compare", "quote": "The comparison with gofmt makes no sense.", "excerpt": "The comparison with gofmt makes no sense. If Go had myriads of compiler implementations (the analogy being target environments for the JVM) that all had different performance characteristics and other behavioral differences depending on how the source code is formatted, you bet that gofmt would have a lot of options as well. The JVM is like an operating system. A better comparison would be Linux kernel parameters: ht", "context": "", "use_case": "", "switched_from": "", "story": "JVM Options Explorer"}, {"id": 761318113, "item_id": 47582382, "url": "https://news.ycombinator.com/item?id=47582382", "by": "yunwal", "date": "2026-03-30", "stance": "neutral", "quote": "most IDEs use gofmt and if your golangci-lint uses a different gofmt version", "excerpt": "Things that are not simple about go tooling - Comments as directives[0]. Nobody finds this intuitive. I've never met anyone that saw what directives were doing and thought to change a comment. - Comments as commands for the compiler[1] - The state of go linting[2]. There are 30 different formatting tools that all frequently conflict with each other. It got so complicated that one project exists to manage installation", "context": "", "use_case": "", "switched_from": "", "story": "Swift 6.3 Released"}, {"id": 759603344, "item_id": 47475209, "url": "https://news.ycombinator.com/item?id=47475209", "by": "notepad0x90", "date": "2026-03-22", "stance": "recommend", "quote": "the right execution is in the style of 'go fmt' with Go", "excerpt": "we don't even use indents that way in natural language. We use things like bullet points, we need specific markers. space is for spacing, tabs are for tabulation, they are not in any human language I know of used as terminators of statements. You know what is the equivalent of an indent or a semicolon in english? a period. <- We have paragraph breaks just like this to delimit blocks of english statements. A semi-colo", "context": "", "use_case": "auto-formatting code", "switched_from": "", "story": "No Semicolons Needed"}, {"id": 742937680, "item_id": 46433605, "url": "https://news.ycombinator.com/item?id=46433605", "by": "fsmv", "date": "2025-12-30", "stance": "neutral", "quote": "I use gofmt auto formatting in my editor", "excerpt": "I made one of these too! I decided not to use // because I use gofmt auto formatting in my editor and it puts a space between the // and the usr. This one isn't changed by gofmt: /*?sr/bin/env go run \"$0\" \"$@\"; exit $? #*/", "context": "", "use_case": "auto-formatting Go code", "switched_from": "", "story": "Go Away Python"}]}