Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hack/go-fmt: Make it easy to auto-format Go
So users and CI tooling can keep our Go clean :). The find call avoids formatting .build/* (Bazel output) and vendor/* (controlled upstream), because gofmt has no special vendor/ handling built in [1]. Formatting our Go and then using 'git diff' to show the changes (and error if there were any) makes it easy for: * CI to see if there were issues (because of the exit code). * Users to see the required changes in the CI logs (because of the output diff). [1]: golang/go#22173 (comment)
- Loading branch information