【发布时间】:2017-09-13 06:20:49
【问题描述】:
通过关注this tutorial,我创建了一个go lang项目,并通过Visual Studio Code打开它。
代码本身运行良好,我可以运行服务器,但不知何故 VS Code 显示
cannot find package "appengine" in any of:
/usr/local/Cellar/go/1.8.3/libexec/src/appengine (from $GOROOT)
/Users/ironsand/go/src/appengine (from $GOPATH)
我以为我必须为 Google App Engine 设置 GOROOT,但根据 this stackoverflow question 我不应该。
如何让 VS Code 正确识别谷歌应用引擎库?
更多信息
appengine 包存在于~/dev/google-cloud-sdk/platform/google_appengine/goroot-1.8/src/appengine 中
我正在使用macOS Sierra 10.12.6。
【问题讨论】:
-
作为健全性检查,“appengine”是否存在于这些目录中? /usr/local/Cellar/go/1.8.3/libexec/src/ 或 /Users/ironsand/go/src/ ?
-
试试这个教程如何添加 GAE 作为扩展:cloud.google.com/tools/visual-studio/docs/quickstart
-
@ironsand 你能解决这个 VS 问题吗?如果是这样,建议您在此处发布您的答案作为解决方案,以更好地帮助社区。span>
-
@Helpful 不,这些目录中没有“appengine”,并且包存在于`~/dev/google-cloud-sdk/platform/google_appengine/goroot-1.8/src/appengine`中。
-
@MaherAbuthraa 本教程适用于
Visual Studio,不适用于Visual Studio Code。
标签: google-app-engine visual-studio-code