Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

google.golang.org/cloud/compute/metadata dependency #88

Closed
tcurdt opened this issue Feb 13, 2015 · 1 comment
Closed

google.golang.org/cloud/compute/metadata dependency #88

tcurdt opened this issue Feb 13, 2015 · 1 comment

Comments

@tcurdt
Copy link

tcurdt commented Feb 13, 2015

I did

go get golang.org/x/oauth2

when I now try to import it

import (
    "golang.org/x/oauth2/google"
)

I am getting

src/golang.org/x/oauth2/google/google.go:25:2: cannot find package "google.golang.org/cloud/compute/metadata" in any of:
    /usr/local/Cellar/go/1.4.1/libexec/src/google.golang.org/cloud/compute/metadata (from $GOROOT)
    MYPROJECT/src/google.golang.org/cloud/compute/metadata (from $GOPATH)

Of course a

go get google.golang.org/cloud/compute/metadata

fixed this - but...

@adg
Copy link
Contributor

adg commented Feb 16, 2015

You ran "go get" on the oauth2 package, which of course did not fetch the google package's dependencies. This is how the go tool works.

If you ran

go get golang.org/x/oauth2/google

or

go get golang.org/x/oauth2/...

it would have fetched those dependencies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants