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?

我可以执行: p>

转到github.com/ docker / docker / client code> p>

(来自此处 ),然后在我的 $ GOPATH / src / github.com / docker / docker / client code>中查看源代码。 p>

但是没有这样的存储库 https://github.com / docker / docker / client 。 p>

实际上从哪里获取源代码? 有人可以指出我的网址吗? p> div>

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.