Make the go-bindata generated code pass gofmt -s

But don't abort the build if gofmt is not installed.
pull/4685/head
Anders F Björklund 2019-07-04 22:56:01 +02:00
parent c41dac7a21
commit 801cd01ada
1 changed files with 2 additions and 0 deletions

View File

@ -200,10 +200,12 @@ test: pkg/minikube/assets/assets.go pkg/minikube/translate/translations.go
pkg/minikube/assets/assets.go: $(shell find deploy/addons -type f)
which go-bindata || GO111MODULE=off GOBIN=$(GOPATH)/bin go get github.com/jteeuwen/go-bindata/...
PATH="$(PATH):$(GOPATH)/bin" go-bindata -nomemcopy -o pkg/minikube/assets/assets.go -pkg assets deploy/addons/...
-gofmt -s -w $@
pkg/minikube/translate/translations.go: $(shell find translations/ -type f)
which go-bindata || GO111MODULE=off GOBIN=$(GOPATH)/bin go get github.com/jteeuwen/go-bindata/...
PATH="$(PATH):$(GOPATH)/bin" go-bindata -nomemcopy -o pkg/minikube/translate/translations.go -pkg translate translations/...
-gofmt -s -w $@
@#golint: Json should be JSON (compat sed)
@sed -i -e 's/Json/JSON/' $@ && rm -f ./-e