About
The Go source script has a standard format defined by the Go team. Why ? Because :
- it eliminates a lot of pointless debate about trivia
- and, more importantly, enables a variety of automated source code transformations that would be infeasible if arbitrary formatting were allowed.
Articles Related
Tools
- Many text editors can be configured to run gofmt each time you save a file
- goimports additionally manages the insertion and removal of import declarations as needed. (available at go get golang.org/x/tools/cmd/goimports)