Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/go: `go get` has no way to get test dependencies #5126
What steps will reproduce the problem? 1. Create a test in your package that imports any package that you don't have downloaded yet. 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)? 6g Which operating system are you using? Mac OS X 10.8.3 Which version are you using? (run 'go version') 1.0.3 Please provide any additional information below. There is a workaround to this, using `go list`. You can build something like this: https://gist.github.com/mitchellh/9655102de0bc0a849cc2 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 dependencies.