When building things that will interact with the client/server you can have a mismatch of API versions.
This is a common way to get started with the Docker client in Go: (this will create a new client based on your environment settings for Docker)
cli, err := client.NewClientWithOpts(client.FromEnv)
You may face an error similar to: