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,
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
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
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,
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.
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
>
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
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:
>
>
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