|
|
@ -1,6 +1,13 @@ |
|
|
|
#!/bin/bash |
|
|
|
#!/bin/bash |
|
|
|
|
|
|
|
|
|
|
|
if [ -n "$(gofmt -l .)" -o $(golint ./... | wc | awk '{print $1}') -gt "2" ]; then |
|
|
|
echo $(golint ./... | wc | awk '{print $1}') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [ $(golint ./... | wc | awk '{print $1}') -gt 2 ]; then |
|
|
|
|
|
|
|
echo "Go code is not formatted:" |
|
|
|
|
|
|
|
gofmt -d . |
|
|
|
|
|
|
|
exit 1 |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
if [ -n "$(gofmt -l .)" ]; then |
|
|
|
echo "Go code is not formatted:" |
|
|
|
echo "Go code is not formatted:" |
|
|
|
gofmt -d . |
|
|
|
gofmt -d . |
|
|
|
exit 1 |
|
|
|
exit 1 |
|
|
|