An Interest In:
Web News this Week
- April 2, 2024
- April 1, 2024
- March 31, 2024
- March 30, 2024
- March 29, 2024
- March 28, 2024
- March 27, 2024
November 28, 2022 02:59 pm GMT
Original Link: https://dev.to/mxglt/how-to-debug-file-is-not-gofmt-ed-with-s-gofmt-1ejf
How to debug : File is not `gofmt`-ed with `-s` (gofmt)
While linting your project, you can have the following error :
pkg/apis/dogs.go:11: File is not `gofmt`-ed with `-s` (gofmt)
To resolve the issue, execute the following command :
gofmt -s -w .
It will simplify the code (with the option -s
) and write the result back (with the option -w
) on all the current folder (with .
).
I hope it will help you!
Original Link: https://dev.to/mxglt/how-to-debug-file-is-not-gofmt-ed-with-s-gofmt-1ejf
Share this article:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To