diff --git a/assets/assets.go b/assets/assets.go index 920488f4f2c30585c91e43b6cb15e3a478460bc5..d203089f8b9be75732e4e8e36dcaebce54b09b79 100644 --- a/assets/assets.go +++ b/assets/assets.go @@ -1,8 +1,8 @@ //go:generate git submodule update --init ./dir-index-html //go:generate go run github.com/go-bindata/go-bindata/v3/go-bindata -mode=0644 -modtime=1403768328 -pkg=assets init-doc dir-index-html/dir-index.html dir-index-html/knownIcons.txt -//go:generate gofmt -w bindata.go +//go:generate gofmt -sw bindata.go //go:generate sh -c "sed -i \"s/.*BindataVersionHash.*/BindataVersionHash=\\\"$(git hash-object bindata.go)\\\"/\" bindata_version_hash.go" -//go:generate gofmt -w bindata_version_hash.go +//go:generate gofmt -sw bindata_version_hash.go package assets import ( diff --git a/bin/test-go-fmt b/bin/test-go-fmt index a9e6d5a733198bf50d4c39ed460df9ee3a942fef..8bd1f07bf2e8a9db6af2eca8a6f1936bcc204568 100755 --- a/bin/test-go-fmt +++ b/bin/test-go-fmt @@ -4,7 +4,7 @@ T="$(mktemp)" find . \ -path ./test/sharness -prune \ -o -path ./plugin/loader/preload.go -prune \ - -o -name '*.go' -print0 | xargs -0 gofmt -l > "$T" + -o -name '*.go' -print0 | xargs -0 gofmt -sl > "$T" if [ -n "$(cat $T)" ]; then echo "Following Go code is not formatted." diff --git a/test/bin/verify-go-fmt.sh b/test/bin/verify-go-fmt.sh deleted file mode 100755 index fedcf511a8d4c5f1444ec9ad65a830f2a07867bb..0000000000000000000000000000000000000000 --- a/test/bin/verify-go-fmt.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh - -#TODO add go lint and go vet - -verify_gofmt() { - GOFMT="gofmt -s" - cd "$(git rev-parse --show-toplevel)" - bad_files=$($GOFMT -l .) - cd - - if [[ -n $bad_files ]]; then - echo "You have to run '$GOFMT' on these files:" - echo "$bad_files" - false - else - true - fi -} - -verify_gofmt