Reference

gofmt(1)

format Go code

NAME

gofmt - format Go code

SYNOPSIS

gofmt [flags] [path]...

DESCRIPTION

A tool for formatting Go source code. For full documentation run gofmt -help or see http://golang.org/cmd/gofmt.

SEE ALSO

go(1)

History

-comments until Debian 11 (Bullseye); -cpuprofile until Debian 13 (Trixie); -d until Debian 13 (Trixie); -e until Debian 13 (Trixie); -l until Debian 13 (Trixie); -r until Debian 13 (Trixie); -s until Debian 13 (Trixie); -tabs until Debian 11 (Bullseye); -tabwidth until Debian 11 (Bullseye); -w until Debian 13 (Trixie).