我在 ~/Applications/google_appengine 中有我的 appengine SDK
在 Eclipse 中,我有一个外部工具设置来运行开发服务器。它指出:
~/Application/google_appengine/dev_appserver.py
同样在 Eclipse (Go Preferences) 中,我已经将 GOROOT 设置为指向
~/Application/google_appengine/goroot
现在,我正在尝试为我的项目运行一些单元测试。如果我使用我的常规 go 安装(不是 appengine 安装),我会收到此错误:
../../context/context.go:4:2: cannot find package "appengine" in any of:
/usr/local/go/src/pkg/appengine (from $GOROOT)
/Users/home/src/go/foodbox/src/appengine (from $GOPATH)
../../context/data.go:4:2: cannot find package "appengine/datastore" in any of:
/usr/local/go/src/pkg/appengine/datastore (from $GOROOT)
/Users/home/src/go/foodbox/src/appengine/datastore (from $GOPATH)
../../context/context.go:5:2: cannot find package "appengine/user" in any of:
/usr/local/go/src/pkg/appengine/user (from $GOROOT)
/Users/home/src/go/foodbox/src/appengine/user (from $GOPATH)
如果我使用 appengine go,我会得到这个:
load cmd/cgo: package cmd/cgo: no Go source files in /Users/home/Application/google_appengine/goroot/src/cmd/cgo
似乎默认安装找不到 appengine 包(我想这并不奇怪)。当我使用 appengine go 工具时,我不确定问题是什么。谁能告诉我如何让这个工作?
撒科打诨
相关分类