Hi,

On my system "go run" creates ~/go and places pkg there, even though 
$GOPATH is set. Whereas "go install" places pkg under $GOPATH.

Ideally, I would like ~/go to never be created.

$ ls ~/go
ls: /Users/foo/go: No such file or directory
$ echo $GOPATH
/Users/foo/Google Drive/programming/golang/workspace
$ pwd
/Users/foo/Google Drive/programming/golang/workspace/github.com/foo/project
$ go mod init github.com/foo/project
go: creating new go.mod: module github.com/foo/project
$ go install
go: finding module for package github.com/google/gopacket
go: finding module for package github.com/google/gopacket/pcap
go: finding module for package github.com/google/gopacket/layers
go: downloading github.com/google/gopacket v1.1.18
go: found github.com/google/gopacket in github.com/google/gopacket v1.1.18
go: found github.com/google/gopacket/layers in github.com/google/gopacket 
v1.1.18
go: found github.com/google/gopacket/pcap in github.com/google/gopacket 
v1.1.18
$ project
[...]
$ ls ~/go
ls: /Users/foo/go: No such file or directory
$ go run ./main.go 
go: downloading github.com/google/gopacket v1.1.18
[...]
$ ls ~/go
pkg
 
Thank you for any help you can provide!

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/85d5a52a-1b4e-49bf-83df-2332a80079f9n%40googlegroups.com.

Reply via email to