Re: [go-nuts] Interaction between Modules and GOPATH

2019-04-17 Thread andrey mirtchovski
> So do *not* use go get when manually cloning the project then I take it?

That is correct. For most developers it would be one or more
repositories that contain many modules, not all of which would be
go-gettable anyway.

Also note that "go get" in module mode (outside of GOPATH) will
unpackage with non-writable permissions to the local cache, as
packages are not intended to be modified. Cloning the repo is the best
way to get something you can work on.

-- 
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] Interaction between Modules and GOPATH

2019-04-17 Thread Ian Bruene



On 4/17/19 2:50 PM, andrey mirtchovski wrote:

If you are fetching it with "go get" then that's presumably because
it's a dependency required by another package or module, in which case
the go command will use the correct place for it based on whether "go
get" was run inside a module directory (then it goes in the module
cache) or anywhere else (then it goes into GOPATH).

If you are not fetching the project as part of a dependency, because
you want to work on it, modify it, etc, then you can clone it anywhere
outside GOPATH on your system and don't need to use "go get". One of
the use cases for go modules was to allow projects to reside
everywhere on the filesystem to allow legacy directory layouts to be
used when developing.


So do *not* use go get when manually cloning the project then I take it?

--
/"In the end; what separates a Man, from a Slave? Money? Power? No. A 
Man Chooses, a Slave Obeys."/ -- Andrew Ryan


/"Utopia cannot precede the Utopian. It will exist the moment we are fit 
to occupy it."/ -- Sophia Lamb


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