Go Formatter
Format Go code — gofmt-style indentation using tabs as per Go convention.
About Go Formatter
Go has a uniquely strict approach to formatting: gofmt is the official formatter and produces only one possible output for any valid Go code. There are no options, no style debates, and no configurable rules. Every Go project uses gofmt. Running gofmt on save is standard in all Go editors. goimports (a superset of gofmt) additionally manages import statements. This tool approximates gofmt output; for exact results, use the Go toolchain.
FAQ
Why does Go use tabs instead of spaces?
Tabs were chosen for Go indentation to allow flexible rendering — developers can set their editor's tab width to any value (2, 4, 8 spaces) without affecting source files. The Go team saw tabs as more flexible than spaces for indentation. gofmt enforces this, so all Go code uses tabs regardless of developer preference.