Closed
Description
What version of Go are you using (go version
)?
$ go version go version go1.13.4 darwin/amd64
What did you do?
$ gofmt -d .
(... diff ...)
$ echo $?
0
What did you expect to see?
Exit value of 1, since there is a diff.
Presence of a diff is the error case, meaning that the code requires formatting. Then for example, makefile targets to check formatting can simply be "gofmt -d ." and do the right thing.
What did you see instead?
exit value of 0