1
0
mirror of https://github.com/dutchcoders/transfer.sh.git synced 2020-11-18 19:53:40 -08:00
2019-03-17 20:19:56 +01:00

13 lines
310 B
Bash
Executable File

#!/bin/bash
# This script is used by the CI to check if the code is gofmt formatted.
set -euo pipefail
GOFMT_DIFF=$(IFS=$'\n'; gofmt -d $( find . -type f -name '*.go' ) )
if [[ -n "${GOFMT_DIFF}" ]]; then
echo "${GOFMT_DIFF}"
echo
echo "The go source files aren't gofmt formatted."
exit 1
fi