Most people think that we format Go code with
gofmt
to make code look nicer or to end debates among team members about program layout. But the most important reason for gofmt is that if an algorithm defines how Go source code is formatted, then programs, likegoimports
orgorename
orgo fix
, can edit the source code more easily, without introducing spurious formatting changes when writing the code back. This helps you maintain code over time.
— Russ Cox
Recent articles
- Notes on the new Claude analysis JavaScript code execution tool - 24th October 2024
- Initial explorations of Anthropic's new Computer Use capability - 22nd October 2024
- Everything I built with Claude Artifacts this week - 21st October 2024