GO-FMT(1)
π go-fmt β bestie edition β¨
okay so. go-fmt is literally the glow-up station for your Go package sources. it's gofmt (reformat) but make it a go command. iykyk π
πΈ SYNOPSIS πΈ
go fmt [-n] [-x] [packages]
that's it. that's the whole vibe. π¦
β¨ DESCRIPTION β¨
okay so here's the tea, bestie: Fmt runs the command gofmt -l -w on the packages named by the import paths. periodt. and then β because it's a considerate icon β it prints the names of the files that are modified. so you know what got touched. π
want more lore on gofmt itself? go read go doc cmd/gofmt. want the full breakdown on how to name your packages? that's go help packages. no cap, both are worth it. π
now, the flags. keep up:
- the
-nflag prints commands that would be executed. like a lil preview. manifesting but make it CLI. π - the
-xflag prints commands as they are executed. live commentary, real-time, main character energy. π₯
and then there's the -mod flag β its value sets which module download mode to use: readonly or vendor. that's the whole menu, bestie, pick one. for more deets see go help modules. π
β οΈ real talk though β if you want to rungofmtwith specific options, rungofmtitself.go fmtis not the one for that. it's giving "different tool, different job". don't make it awkward. π
π SEE ALSO π
go fix(1)go vet(1)
like, go look at them. they're right there. slay. β¨
π«Ά AUTHOR π«Ά
this manual page was created using help2man and afterwards updating the output. (yes, that's the actual process. iconic? debatable. honest? absolutely. π
)
it is maintained by the Debian Go Compiler Team <team+go-compiler@tracker.debian.org> for the Debian project (and may be used by others). give them their flowers, they earned them. πΈ
β¨ and that's a wrap on this one, bestie β¨
this page is chillin' under Go 1.27, dated August 2026. go forth and format responsibly. πππ¦
π¦ where this page comes from
- ubuntu stonking: golang-go 2:1.27~1 Β· Go
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms