v/script/format.sh

7 lines
113 B
Bash

#!/usr/bin/bash
if [[ -z "$FIX" ]]; then
[ -z "$(gofmt -s -l ./)" ] || exit 1
else
gofmt -s -l -w ./
fi