Cannot install docker pkg dependency in Go
I’m trying to use the docker package in one of my Go applications. I’m importing the package as
import "github.com/dotcloud/docker" in my script. But when trying to build the dependencies, that is, when I run
go get in my project directory, it says:
foo.go:9:2: no buildable Go source files in /home/neville/gocode/src/github.com/dotcloud/docker
GOPATH is set to
/home/neville/gocode, so when doing
go get, the package should get downloaded to
/home/neville/gocode/pkg, instead of
/home/neville/gocode/src. What am I missing here?
One Solution collect form web for “Cannot install docker pkg dependency in Go”
github.com/dotcloud/docker isn’t a Go package, and that’s why there are no source files in that directory.
Import the package you want directly, like so for the registry package:
go get does download into
$GOPATH/src. The installed object files go in