Back to godoc.org
The go-post tool post-processes Go source code to make it more idiomatic (*.go -> *.go).
The input of go-post is unpolished Go source code and the output is more idiomatic Go source code.
usage: go tool fix [-diff] [-r fixname,...] [-force fixname,...] [path ...] -diff display diffs instead of rewriting files -force string force these fixes to run even if the code looks updated -r string restrict the rewrites to this comma-separated list Available rewrites are: assignbinop Replace "x = x + z" with "x += z". deadassign Remove "x = x" assignments. deadlabel Remove unused labels. forloop Add initialization and post-statements to for-loops. mainret Replace return statements with calls to os.Exit in the "main" function. unresolved Replace assignment statements with declare and initialize statements at the first occurrence of an unresolved identifier.
Documentation was rendered with GOOS=linux and GOARCH=amd64.