Categorygithub.com/packtpublishing/go-application-development-tips-tricks-and-techniquesexample-gofmt
package
0.0.0-20230130082457-1c905cd2e9ad
Repository: https://github.com/packtpublishing/go-application-development-tips-tricks-and-techniques.git
Documentation: pkg.go.dev
# README
Consinstent formatting with go fmt
-
Print reformatted file to stdout:
gofmt main.go
-
Test that all files in package conform to gofmt's standards (useful for CI pipeline):
test $(gofmt -l . | wc -l) -eq 0
-
Rewrite all files:
gofmt -w -l .