CmdID

CmdID / Commands

go-fmt

Format Go source files, printing the changed filenames. tldr-pages

On several platforms

Opens CmdID with your command. It is read in your browser and sent nowhere.

Several platforms

from tldr-pages, CC BY 4.0

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 fmtIdentify

Format a specific Go package in your import path ($GOPATH/src)

go fmt path/to/packageIdentify

Format the package in the current directory and all subdirectories (note the ...)

go fmt ./...Identify

Print what format commands would've been run, without modifying anything

go fmt -nIdentify

Print which format commands are run as they are run

go fmt -xIdentify