Skip to content

Commit afe5e72

Browse files
linuxtmtyRBT_IOT
andauthored
fix: gopath is no longer set (#591)
Co-authored-by: RBT_IOT <[email protected]>
1 parent 2c42ccd commit afe5e72

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
21
SELF_DIR=$(dir $(lastword $(MAKEFILE_LIST)))
3-
42
GOOS=$(shell go env GOOS)
3+
GOPATH=$(shell go env GOPATH)
54
GOARCH=$(shell go env GOARCH)
65
GO_PLUGIN_BUILD=go build -buildmode=plugin -trimpath -gcflags="all=-N -l"
76
PLUGINS=$(notdir $(wildcard $(ROOT_DIR)/cmd/plugin/*))
@@ -78,7 +77,7 @@ fmt: ## Run 'go fmt' & goimports against code.
7877
@echo ">>>>>>>>>>>> Formating codes"
7978
@[[ -e ${GOPATH}/bin/goimports ]] || (echo "installing goimports ..." && go install golang.org/x/tools/cmd/goimports@latest)
8079
@$(FIND) -type f | xargs gofmt -s -w
81-
@$(FIND) -type f | xargs goimports -w -local $(DTM_ROOT)
80+
@$(FIND) -type f | xargs ${GOPATH}/bin/goimports -w -local $(DTM_ROOT)
8281

8382
.PHONY: vet
8483
vet: ## Run "go vet ./...".

0 commit comments

Comments
 (0)