The precommit Git hook is using the wrong command to format the code. Gives the following output:
vendor/golang.org/x/tools/cmd/fiximports/testdata/src/old.com/bad/bad.go:2:43: expected 'package', found 'EOF'
vendor/golang.org/x/tools/go/loader/testdata/badpkgdecl.go:1:34: expected 'package', found 'EOF'