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

cmd/go: go get has no way to get test dependencies #5126

mitchellh opened this issue Mar 25, 2013 · 4 comments

cmd/go: go get has no way to get test dependencies #5126

mitchellh opened this issue Mar 25, 2013 · 4 comments


Copy link

What steps will reproduce the problem?

1. Create a test in your package that imports any package that you don't have downloaded
2. `go get`
3. `go test` - Fails due to import not found. 

What is the expected output?

`go get` will get the test dependencies as well, or at least have a flag to.

What do you see instead?

`go get` doesn't get any test dependencies, so the tests fail.

Which compiler are you using (5g, 6g, 8g, gccgo)?


Which operating system are you using?

Mac OS X 10.8.3

Which version are you using?  (run 'go version')


Please provide any additional information below.

There is a workaround to this, using `go list`. You can build something like this:

However, I feel that this is less than ideal and is counter-intuitive to the rest of the
way that Go works. I think there should be a flag on `go get` that gets test
Copy link

rsc commented Jul 30, 2013

Comment 2:

Labels changed: added priority-later, go1.2maybe, feature, removed priority-triage.

Copy link

robpike commented Aug 4, 2013

Comment 3:

Labels changed: added toolchange.

Status changed to Accepted.

Copy link

adg commented Aug 11, 2013

Comment 4:

Owner changed to @adg.

Status changed to Started.

Copy link

adg commented Aug 14, 2013

Comment 5:

This issue was closed by revision 5dde7cc.

Status changed to Fixed.

@rsc rsc added this to the Go1.2 milestone Apr 14, 2015
@rsc rsc removed the go1.2maybe label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 2016
@rsc rsc unassigned adg Jun 22, 2022
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet

No branches or pull requests

5 participants