go fmt

Format Go source files, printing the changed filenames. More information: https://pkg.go.dev/cmd/go#hdr-Gofmt__reformat__package_sources.

go fmt

go fmt {{path/to/package}}

go fmt {{./...}}

go fmt -n

go fmt -x