douzhuoxia0587 2019-01-30 23:43
浏览 148
已采纳

Go docker SDK是从哪里获取的?

I can execute:

go get github.com/docker/docker/client

(from here) and see the source in my $GOPATH/src/github.com/docker/docker/client.

But there is no such repository https://github.com/docker/docker/client.

Where does go actually get the source from? Can someone point me to the url?

  • 写回答

1条回答 默认 最新

  • douzuqin3467 2019-01-31 00:35
    关注

    Q: Where does the go docker sdk gets fetched from?

    A: As mentioned. https://github.com/moby/moby

    I had trouble working out the answer like you do as well. But this is how I derived it in the end.

    Like what you you did.

    First, running go get github.com/docker/docker/client. This command git cloned a docker/docker project into my $GOPATH/github.com directory.

    Then I went to the project directory and did a git remote get-url origin to find out the original source it came from.

    Output is: https://github.com/docker/docker

    Putting this URL into the browser redirects me to the github.com/moby/moby project, I think they must have setup a dns to redirect people to that URL.

    I haven't lookup or read about how the go get command works but it seems like there is a little bit of smartness in there to tell it that github.com/docker/docker is the actual project's URL which git clone would perform against. Then the /client bit is just a submodule or a directory of the project that it is cloning from.

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

报告相同问题?

悬赏问题

  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料