英文:
build constraint app engine golang
问题
我对Go语言和应用引擎都不太熟悉,
我遇到了这个错误无法找到包"appengine"。
所以我进行了一些研究,发现了构建约束的相关信息
https://stackoverflow.com/questions/19852395/cannot-find-package-appengine-cloudsql
我尝试通过以下命令解决问题。
go build -v -tags +build appengine
但是我得到了相同的错误包appengine: 无法找到包"appengine"。
我可以运行goapp服务器并将应用部署到应用引擎
但是我无法构建或获取应用引擎库的自动完成功能
谢谢,
miki
英文:
Im pretty new to go and to the the app engine ,
I got this error cannot find package "appengine" .
so i researched a little bit and i found out about build constraint
https://stackoverflow.com/questions/19852395/cannot-find-package-appengine-cloudsql
I tried to solve it by this commands .
go build -v -tags +build appengine
But i got the same error package appengine: cannot find package "appengine" .
I can run the goapp server and deploy app to the app engine
But i cant build or get the auto complete of the app engine library
thanks,
miki
答案1
得分: 0
你只需要使用-tags appengine
,并在需要在appengine上工作的文件中以以下方式启动它:
// +build appengine
package someName
英文:
You just need to use -tags appengine
, and in the file that needs to just work on appengine you can start it with:
// +build appengine
package someName
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论