go-fmt
Format Go source files, printing the changed filenames. tldr-pages
On several platforms
Several platforms
Format Go source files, printing the changed filenames. Note: ./... is a Go package pattern understood by Go tooling. It matches the current package and all packages recursively under the current directory.
Format Go source files in the current directory
go fmtIdentifyFormat a specific Go package in your import path ($GOPATH/src)
go fmt path/to/packageIdentifyFormat the package in the current directory and all subdirectories (note the ...)
go fmt ./...IdentifyPrint what format commands would've been run, without modifying anything
go fmt -nIdentifyPrint which format commands are run as they are run
go fmt -xIdentify