英文:
How can I import the github version of Golang Appengine because the version google.golang.org/appengine is outdated?
问题
google.golang.org/appengine的存储库已过时(特别是aetest包),最新版本的aetest似乎在github.com/golang/appengine上。
我不确定如何正确地将存储库代码导入到我的本地计算机,因为代码存储库中的导入路径指向一个过时的存储库。
我尝试了:
$ go get github.com/golang/appengine
package github.com/golang/appengine: code in directory /Users/Bryan/work/gocode/src/github.com/golang/appengine expects import "google.golang.org/appengine"
所以看起来Github存储库中的代码使用了旧的导入路径。
我应该如何正确导入最新版本的golang appengine?
英文:
The repository at google.golang.org/appengine is outdated( aetest package specifically), the most current version of aetest looks like it's at github.com/golang/appengine
I'm not sure how to propery import the repository code to my local computer because the import paths in the code repository are to an outdated repository.
I attempted:
$ go get github.com/golang/appengine
package github.com/golang/appengine: code in directory /Users/Bryan/work/gocode/src/github.com/golang/appengine expects import "google.golang.org/appengine"
So it looks like the code in the Github repository uses the old import path.
How should I properly import the most current version of golang appengine?
答案1
得分: 1
将文件从$GOPATH/src/github.com/golang/appengine
复制到$GOPATH/src/google.golang.org/appengine
,并将google.golang.org/appengine
作为导入路径使用。
或者进入$GOPATH/src/github.com/golang/appengine/doc.go
,并删除文件中package appengine
后面的注释。
这是Go 1.4中添加的规范导入路径的结果。
英文:
Copy the files from $GOPATH/src/github.com/golang/appengine
to $GOPATH/src/google.golang.org/appengine
, and use google.golang.org/appengine
as the import path.
That, or go into $GOPATH/src/github.com/golang/appengine/doc.go
and delete the comment after package appengine
in the file.
This is a result of canonical import paths added in Go 1.4.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论