Install goimports if needed (travis)
Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>pull/157/head
parent
c1bc52eb65
commit
39f0a4e561
|
@ -19,6 +19,8 @@ HACK_DIR=$(dirname "${BASH_SOURCE}")
|
|||
echo "Updating formatting"
|
||||
|
||||
gofmt -w -s $(find . -type f -name "*.go" -not -path "./vendor/*" -not -path "./pkg/generated/*" -not -name "zz_generated*")
|
||||
|
||||
command -v goimports > /dev/null || go get golang.org/x/tools/cmd/goimports
|
||||
goimports -w -d $(find . -type f -name "*.go" -not -path "./vendor/*" -not -path "./pkg/generated/*" -not -name "zz_generated*")
|
||||
|
||||
echo "Success!"
|
||||
|
|
|
@ -26,6 +26,7 @@ fi
|
|||
echo "Success!"
|
||||
|
||||
echo "Verifying goimports"
|
||||
command -v goimports > /dev/null || go get golang.org/x/tools/cmd/goimports
|
||||
goimports -l $(find . -type f -name "*.go" -not -path "./vendor/*" -not -path "./pkg/generated/*" -not -name "zz_generated*")
|
||||
echo "Success!"
|
||||
|
||||
|
|
Loading…
Reference in New Issue