2017-06-09 142 views
1

应用程序工作正常,当我运行在本地用: $ dev_appserver.py的app.yaml为什么“去测试-v”没有看到GOPATH或GOPATH,而是“去env”呢?

然而,当我尝试运行测试,ENV似乎并没有被设置。

$去测试-v

skincare.go:6:5: cannot find package "appengine" in any of: 
    /usr/local/go/src/appengine (from $GOROOT) 
    /Users/bryan/go/src/appengine (from $GOPATH) 
skincare.go:7:5: cannot find package "appengine/datastore" in any of: 
    /usr/local/go/src/appengine/datastore (from $GOROOT) 
    /Users/bryan/go/src/appengine/datastore (from $GOPATH) 
skincare.go:8:5: cannot find package "appengine/user" in any of: 
    /usr/local/go/src/appengine/user (from $GOROOT) 
    /Users/bryan/go/src/appengine/user (from $GOPATH) 

$去ENV

GOARCH="amd64" 
GOBIN="" 
GOEXE="" 
GOHOSTARCH="amd64" 
GOHOSTOS="darwin" 
GOOS="darwin" 
GOPATH="/Users/bryan/go/" 
GORACE="" 
GOROOT="/usr/local/go" 
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64" 
GO15VENDOREXPERIMENT="1" 
CC="clang" 
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common" 
CXX="clang++" 
CGO_ENABLED="1" 

回答

2

$GOPATH不应该不包含路径的src一部分。所以不是指向/Users/bryan/go/src/它应该指向/Users/bryan/go

+0

我修正了这个问题,我仍然有相同的错误。 – BryanWheelock

+0

你确定他们是完全一样的错误。如果不同,请发布。 –

+0

错误的路径确实发生了变化,我在OP上更新了它们。 – BryanWheelock

相关问题