duanluan8390 2017-05-01 17:04
浏览 149
已采纳

由于版本google.golang.org/appengine已过时,如何导入Golang Appengine的github版本? [重复]

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?

</div>
  • 写回答

1条回答 默认 最新

  • dqeonr8554 2017-05-01 17:16
    关注

    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.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?