You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I git clone this repo and make a build, some issues occur
/pubstore/build go install ./cmd/pubstore/pubstore.go
/bin/sh: 工作(Work): No such file or directory
make: *** [cmd/pubstore/pubstore.go] Error 1
After reach I found this problem:
The GOPATH setting method in this Makefile is based on the old Go project management method, which uses GOPATH. In modern Go development, it is recommended to use Go Modules to manage dependencies without the need to set GOPATH.
So, I update this Makefile
ROOT_DIR=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
BUILD_DIR=$(ROOT_DIR)/build
rm=rm -rf
pubstore=cmd/pubstore/pubstore.go
swag=~/go/bin/swag
.PHONY: all clean $(pubstore) test docs run
all: $(pubstore)
clean:
$(rm) $(BUILD_DIR)
test:
go test -coverpkg=./pkg/./... ./pkg/./...
build: $(pubstore)
docs:
$(swag) init -g router.go -d pkg/api -o pkg/docs
$(pubstore):
go install ./$@
run:
go run $(pubstore)
The text was updated successfully, but these errors were encountered:
When I git clone this repo and make a build, some issues occur
After reach I found this problem:
The GOPATH setting method in this Makefile is based on the old Go project management method, which uses GOPATH. In modern Go development, it is recommended to use Go Modules to manage dependencies without the need to set GOPATH.
So, I update this Makefile
The text was updated successfully, but these errors were encountered: