Re: [go-nuts] Go test to run over sub packages?

2016-06-21 Thread gabriel . kopley
Is `$ go test github.com/foo/proj/...` 

 really 
supposed to work?

When I run it I get

warning: "github.com/foo/proj/..." matched no packages
no packages to test

But `cd src/github.com/foo/proj && go test ./...` does work as suggested.

> Use the `...` widlcard. Ex: `$ go test github.com/foo/proj/...` 
> 
>  
> or `go 
> > test ./...`. 
> > 
> > Reference here: 
> http://golang.org/cmd/go/#hdr-Description_of_package_lists 
>
> Nice! Part of "package lists", so also works for `go fmt`: 
>
>go fmt ./... 
>
> -- 
> Sonia Hamilton 
> http://www.snowfrog.net 
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] Go test to run over sub packages?

2016-06-21 Thread gabriel . kopley
Hi Ian, thanks for the confirmation!

It turns out that the cause of this behavior is that I had followed the 
instructions at 
https://github.com/karlseguin/the-little-go-book/blob/9f95b4405760fe9d24d4f9b7da93889cc9306f58/en/go.md#getting-started
 
and
symlinked thus: `$ ln -s ~/code/golang-workspace/src/github.com/foo/proj 
~/code/proj`

In a directory structure without the symlink, things work correctly :)

I'll file an issue on the Little Book of Go about this gotcha.

Gabe


On Tuesday, June 21, 2016 at 3:09:35 PM UTC-7, Ian Lance Taylor wrote:
>
> On Tue, Jun 21, 2016 at 12:42 PM,  > 
> wrote: 
> > Is `$ go test github.com/foo/proj/...`  
> really supposed to work? 
>
> Yes. 
>
> > When I run it I get 
> > 
> > warning: "github.com/foo/proj/..." matched no packages 
> > no packages to test 
> > 
> > But `cd src/github.com/foo/proj && go test ./...` does work as 
> suggested. 
>
> What is the value of your GOPATH environment variable? 
>
> Ian 
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.