构建约束应用程序引擎golang

huangapple go评论69阅读模式
英文:

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

huangapple
  • 本文由 发表于 2015年3月5日 05:30:20
  • 转载请务必保留本文链接:https://go.coder-hub.com/28865383.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定