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

由于版本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>

图片转代码服务由CSDN问答提供 功能建议

此问题已经存在 在这里有答案

  • 使用受限制的(” gopkg.in/throttled/throttled.v2“)库时出现错误 1个答案 \ n

    google.golang.org/appengine上的存储库已过时(特别是aetest软件包),最新版本的aetest看起来像在github.com/golang/appengine

    我不确定如何正确地将存储库代码导入到本地计算机,因为代码存储库中的导入路径是到过时的存储库。

    我尝试过:
    $ 去获取github.com/golang/appengine

      package github.com/golang/appengine:目录/Users/Bryan/work/gocode/src/github.com/golang/appengine中的代码期望导入“ google.golang.org/appengine”
      
     
     

    因此,看起来Github存储库中的代码使用了旧的导入路径。

    我应该如何正确导入最新版本的golang appengine?

  • 写回答
  • 好问题 提建议
  • 关注问题
  • 收藏
  • 邀请回答

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.

    已采纳该答案
    评论
    解决 无用
    打赏 举报

相关推荐 更多相似问题