我是 Go 新手,我一直在本地从事 Go 项目。我通过以下方式在本地系统中安装了 Godep:
go get github.com/tools/godep
然后安装 Aerospike 依赖
go get -u github.com/aerospike/aerospike-client-go
但是$GOPATH/bin/godep save ./...
给了我以下错误:-
godep: [WARNING]: godep should only be used inside a valid go package directory and
godep: [WARNING]: may not function correctly. You are probably outside of your $GOPATH.
godep: [WARNING]: Current Directory: /Users/XYZ/go_code/labs-audience
godep: [WARNING]: $GOPATH: /Users/XYZ/go_code
godep: WARNING: Godep workspaces (./Godeps/_workspace) are deprecated and support for them will be removed when go1.8 is released.
godep: WARNING: Go version (go1.6) & $GO15VENDOREXPERIMENT= wants to enable the vendor experiment, but disabling because a Godep workspace (Godeps/_workspace) exists
godep: WARNING: Recorded major go version (go1.5) and in-use major go version (go1.6) differ.
godep: To record current major go version run `godep update -goversion`.
它会截断我的Godeps/Godeps.json
和Godeps/_workspace/
目录。请注意,我不打算将项目 Go 版本升级到 1.6。我在做什么错?
笔记:
- $PROJECT_PATH: $GOPATH/project/
- 所有命令都在 $PROJECT_PATH 中运行