appengine dev_appserver.py没有使用正确的GOPATH

时间:2017-08-05 08:41:54

标签: google-app-engine go

根据这个go blog,appengine SDK应该能够检测GOPATH,但看起来并非如此。相反,它正在考虑将appengine SDK安装目录中的一些路径作为GOPATH。关于如何使appengine与现有的GOPATH一起工作的任何想法,而不必改变它?

dev_appserver.py app.yaml


................

Can't find package "github.com/gorilla/context" in $GOPATH: cannot find package "github.com/gorilla/context" in any of:
/Users/muly_ae/Applications/google-cloud-sdk/platform/google_appengine/goroot-1.6/src/github.com/gorilla/context (from $GOROOT)
/Users/muly_ae/Applications/google-cloud-sdk/platform/google_appengine/gopath/src/github.com/gorilla/context (from $GOPATH)

这是我的Go env:

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/muly_ae/go"
GORACE=""
GOROOT="/usr/local/Cellar/go/1.8.3/libexec"
GOTOOLDIR="/usr/local/Cellar/go/1.8.3/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"

0 个答案:

没有答案