-
gofmt
From the FAQ:
…the program gofmt is a pretty-printer whose purpose is to enforce layout rules; it replaces the usual compendium of do’s and don’ts that allows interpretation. All the Go code in the repository has been run through gofmt.
usage: gofmt [flags] [path ...] -tabwidth=8: tab width -trace=false: print parse trace -r="": rewrite rule (e.g., 'α[β:len(α)] -> α[β:]') -debug=false: print debugging information -tabindent=true: indent with tabs independent of -spaces -l=false: list files whose formatting differs from gofmt's -w=false: write result to (source) file instead of stdout -spaces=true: align with spaces instead of tabs -comments=true: print comments
Posted on March 10, 2010 ()