Last active
December 6, 2017 02:00
-
-
Save mboersma/11333125 to your computer and use it in GitHub Desktop.
Go project pre-commit hook
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Save this file as ".git/hooks/pre-commit" in your | |
# git repository and set it to executable. | |
# | |
# To use the "go vet" command: | |
# $ go get -v code.google.com/p/go.tools/cmd/vet | |
# To use the "golint" command: | |
# $ go get -v github.com/golang/lint/golint | |
go fmt ./... | |
go vet ./... | |
golint . | |
go test ./... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
go vet is now be installed with
go get -v -u golang.org/x/tools/cmd/vet