gofmt

gofmt

TLDR

Format a file and display the result to the console

>_ gofmt [source.go]
copy

Format a file, overwriting the original file in-place

>_ gofmt -w [source.go]
copy

Format a file, and then simplify the code, overwriting the original file

>_ gofmt -s -w [source.go]
copy

Print all (including spurious) errors

>_ gofmt -e [source.go]
copy

Copied to clipboard
free 100$ digital ocean credit