mirror of
https://gitee.com/johng/gf.git
synced 2024-12-12 12:45:08 +08:00
6 lines
266 B
Bash
6 lines
266 B
Bash
#!/usr/bin/env bash
|
|
|
|
find . -name "*.go" | xargs gofmt -w
|
|
git diff --name-only --exit-code || if [ $? != 0 ]; then echo "Notice: gofmt check failed,please gofmt before pr." && exit 1; fi
|
|
echo "gofmt check pass."
|
|
sudo echo "127.0.0.1 local" | sudo tee -a /etc/hosts |