1. Sam Whited
  2. go-pre-commit

Overview

HTTPS SSH

Go pre-commit hooks

These are a few hooks for pre-commit by Yelp to run basic Golang tools against simple Go repos.

The hooks available are:

  • gofmt
  • gofix
  • govet
  • gobuild
  • gotest

They do exactly what they sound like they do.

An example .pre-commit-config.yaml:

-   repo: https://bitbucket.org/samwhited/go-pre-commit.git
    sha: HEAD
    hooks:
      -   id: gofmt
      -   id: gobuild

License

It's just a YAML file and a Bash one-liner… use them however the hell you want.