blob: 9bf0d16847b2d0d57b5e8854132fb9e2734aae1a [file] [log] [blame]
#!/bin/bash
set -ev
# Only check for go1.10+ since the gofmt style changed
if [[ $(go version) =~ go1\.([0-9]+) ]] && ((${BASH_REMATCH[1]} >= 10)); then
test -z "$(gofmt -d -s . | tee /dev/stderr)"
fi