#golang
Run gofmt on all files
January 07, 2019
//30 sec read
To run go formatter recursively on all project’s files simply use:
gofmt -s -w .
To print the files that has been changed add -l option:
gofmt -l -s -w .
Useful options:
-ddisplay diffs instead of rewriting files-llist files where formatting differs from gofmt’s-ssimplifies the code-wwrites results back