TeknasVaruas
TeknasVaruas

Reputation: 1510

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

Here, my 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?

Upvotes: 0

Views: 509

Answers (1)

JimB
JimB

Reputation: 109318

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:

import "github.com/dotcloud/docker/registry"

Also, go get does download into $GOPATH/src. The installed object files go in $GOPATH/pkg.

Upvotes: 2

Related Questions