如何将外部包添加到 Google App Engine 的 GoClipse 项目?
我已经编译了 Goauth,以便可以在我的 Go Google App Engine 项目中使用 OAuth。我应该将 goauth.a 文件放在哪里,以便我既可以在项目中使用它,又可以在部署到 GAE 服务器时使用它?如果我将它放在 $GOROOT/pkg 的子文件夹中,我可以让它在本地工作,但是在部署时编译时找不到它。
GoClipse 设置了一个包含很多文件夹的项目,我不太确定它们的目的是什么,我应该把 goauth.a 放在哪里以及如何导入它?
I've compiled Goauth so that I can use OAuth in my Go Google App Engine project. Where do I put the goauth.a file so that I can both use it in the project, and have it available when deploying to the GAE servers? I can get it working locally if I put it in a subfolder of $GOROOT/pkg, but then it can't be found when compiling at deployment time.
GoClipse sets up a project with lots of folders, I'm not really sure what their purpose is, where should I put goauth.a and how do I import it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为了解决这个问题,我最终将包的源代码包含在我的应用程序的目录树中,如 google-appengine-go 组 http://groups.google.com/group/google-appengine-go/browse_thread/thread/1fe745debc678afb
以下是该线程的重要部分:
To fix this I ended up including the source for the package in the directory tree for my app, as mentioned in this thread on the google-appengine-go group http://groups.google.com/group/google-appengine-go/browse_thread/thread/1fe745debc678afb
Here is the important part of the thread: