-
Notifications
You must be signed in to change notification settings - Fork 18.9k
Description
The SDK is very unfriendly for beginners.
Apart from the fact every program imports docker/docker (including docker-ce and kubernetes) and that redirects to moby/moby on the website, the default version you get from go is v1.13.1 and people just seem to import specific commits. The releases can not be seen on moby/moby but can be found on docker/engine however you can not import specific version from there, since other dependencies will crash.
Even the documentation on the website does not work. This is from https://docs.docker.com/develop/sdk/examples/:
statusCh, errCh := cli.ContainerWait(ctx, resp.ID, container.WaitConditionNotRunning)
select {
case err := <-errCh:
if err != nil {
panic(err)
}
case <-statusCh:
}
cli.ContainerWait does not return chans, it returns (int64, error) on v1.13.1, and the website does not say how to get other versions of the SDK. Even the documentation on godoc.org is wrong since it tells you to get import "github.com/docker/docker/client" and that will get you v1.13.1, which does not return (<-chan container.ContainerWaitOKBody, <-chan error) as specified in the documentation.
Are there any plans to offer some proper documentation and releases so that people can actually use the SDK, without having to dig from git?