mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-04 21:09:06 +08:00
13 lines
245 B
Bash
13 lines
245 B
Bash
|
#!/usr/bin/env bash
|
||
|
|
||
|
SCRIPTS_DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||
|
|
||
|
GO_SRC_DIR="${SCRIPTS_DIR}/$1"
|
||
|
if test -z "$(gofmt -d $GO_SRC_DIR)"; then
|
||
|
exit 0
|
||
|
else
|
||
|
gofmt -d $GO_SRC_DIR
|
||
|
echo "Please format your code by gofmt!"
|
||
|
exit 1
|
||
|
fi
|