📌  相关文章
📜  go fmt all files - Go 编程语言 - Go 编程语言代码示例

📅  最后修改于: 2022-03-11 14:45:01.272000             🧑  作者: Mango

代码示例1
gofmt -w .   # formats files in current directory and all sub-directories
 go fmt ./... # similar to previous
 go fmt .     # formats files in current package
 gofmt -w foo/bar # formats files in directory $PWD/foo/bar and sub-dirs
 go fmt foo/bar   # formats files in directory $GOPATH/src/foo/bar
 gofmt -w     # error, no file or directory specified
 go fmt       # formats files in current package