Re: [go-nuts] Go list returning directory starting with underscore on Ubuntu
I've encountered similar behavior with testdata directories within GOPATH, when not in module-aware mode. I found this thread while searching for answers, so I'm linking the issue I just created in case anyone else runs into the same bug: https://github.com/golang/go/issues/28155 On Wednesday, April 25, 2018 at 4:21:43 PM UTC+1, run...@uber.com wrote: > > Not accurate. > > $ cat ~/code/scratch/repro-underscore-issue.sh > echo "GOPATH: $GOPATH" > mkdir -p $GOPATH/src/github.com/testcase/testdata > echo "package testdata" > $GOPATH/src/ > github.com/testcase/testdata/testdata.go > echo "" >> $GOPATH/src/github.com/testcase/testdata/testdata.go > cd $GOPATH/src/github.com/testcase/testdata > echo "Running go list ./..." > go list ./... > > $ ~/code/scratch/repro-underscore-issue.sh > GOPATH: /Users/prungta/code/gocode > Running go list ./... > _/Users/prungta/code/gocode/src/github.com/testcase/testdata > > > Should this be a bug report? > -- 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 list returning directory starting with underscore on Ubuntu
Not accurate. $ cat ~/code/scratch/repro-underscore-issue.sh echo "GOPATH: $GOPATH" mkdir -p $GOPATH/src/github.com/testcase/testdata echo "package testdata" > $GOPATH/src/github.com/testcase/testdata/testdata.go echo "" >> $GOPATH/src/github.com/testcase/testdata/testdata.go cd $GOPATH/src/github.com/testcase/testdata echo "Running go list ./..." go list ./... $ ~/code/scratch/repro-underscore-issue.sh GOPATH: /Users/prungta/code/gocode Running go list ./... _/Users/prungta/code/gocode/src/github.com/testcase/testdata Should this be a bug report? On Wednesday, April 25, 2018 at 1:05:10 AM UTC-4, Dave Cheney wrote: > > If the path start with _ then it is not within the list of directories in > your GOPATH. -- 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 list returning directory starting with underscore on Ubuntu
If the path start with _ then it is not within the list of directories in your GOPATH. -- 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 list returning directory starting with underscore on Ubuntu
Even with GOPATH set correctly, this can happen if you're running `go list ./...` and any directory in your current path is called `testdata`. ie. ``` $ pwd /home/user/xyz/testdata/whatever/ $ go list ./... _/home/user/xyz/testdata/whatever/xxx ``` On Friday, March 2, 2018 at 3:49:41 AM UTC-5, Michel Hollands wrote: > > My mistake: there was no src directory under the gopath. It works now. > -- 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 list returning directory starting with underscore on Ubuntu
My mistake: there was no src directory under the gopath. It works now. -- 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 list returning directory starting with underscore on Ubuntu
Michel, Could you post the output of 'go env' and the name of the directory from which you re-ran 'go list'? -s sent from my droid On Mar 2, 2018 9:38 AM, "Michel Hollands"wrote: > Hello Sebastien, > > After setting GOPATH it still occurs. > > Thanks, > > Michel > > -- > 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. > -- 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 list returning directory starting with underscore on Ubuntu
Hello Sebastien, After setting GOPATH it still occurs. Thanks, Michel -- 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 list returning directory starting with underscore on Ubuntu
Hi Michel, I believe this is because you ran 'go list' from a directory outside of $GOPATH. -s sent from my droid On Mar 1, 2018 6:22 PM, "Michel Hollands"wrote: > Hello, > > When running go list on Ubuntu the results are weird: > > michel@michel-VirtualBox:~/git/grpcurl$ go list . > _/home/michel/git/grpcurl > michel@michel-VirtualBox:~/git/grpcurl$ > > Running the same on the Mac returns just grpcurl, which is the correct > package. > > The Go version is: > > go version go1.10 linux/amd64 > > The Ubuntu is 16.04.4 LTS which was freshly installed. > > Any ideas about what could be wrong? > > Thanks in advance, > > Michel > > -- > 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. > -- 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.