From ddfcaf43b81a7cafd0737735c6926116d320fcf5 Mon Sep 17 00:00:00 2001 From: lowzj Date: Wed, 24 Jul 2019 09:22:49 +0800 Subject: [PATCH] chore: fix script to check code format Signed-off-by: lowzj --- hack/check.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/check.sh b/hack/check.sh index c985bb5a0..6d4efa9db 100755 --- a/hack/check.sh +++ b/hack/check.sh @@ -5,7 +5,7 @@ cd "${curDir}/../" || return check() { # gofmt echo "CHECK: gofmt, check code formats" - result=$(find . -name '*.go' -print0 | xargs gofmt -s -l -d 2>/dev/null) + result=$(find . -name '*.go' -print0 | xargs -0 gofmt -s -l -d 2>/dev/null) if [[ ${#result} -gt 0 ]]; then echo "${result}" echo "CHECK: please format Go code with 'gofmt -s -w .'"