mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 09:49:50 +00:00
Make gofmt message explicit about -s option
This commit is contained in:
parent
3d1dfd47ee
commit
8d6c163650
@ -44,9 +44,10 @@ find_files() {
|
|||||||
\) -name '*.go'
|
\) -name '*.go'
|
||||||
}
|
}
|
||||||
|
|
||||||
bad_files=$(find_files | xargs gofmt -s -l)
|
GOFMT="gofmt -s"
|
||||||
|
bad_files=$(find_files | xargs $GOFMT -l)
|
||||||
if [[ -n "${bad_files}" ]]; then
|
if [[ -n "${bad_files}" ]]; then
|
||||||
echo "!!! gofmt needs to be run on the following files: "
|
echo "!!! '$GOFMT' needs to be run on the following files: "
|
||||||
echo "${bad_files}"
|
echo "${bad_files}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user