On Monday, March 4, 2019 at 5:49:06 PM UTC+1, Jorrit Salverda wrote:
>
> I'd like to be able to use go mod download to download packages to 
> another directory than GOPATH/pkg/mod and automatically have all go 
> commands be aware of this new location.
>
>
> This is specifically for CI/CD to ensure I can download modules in one 
> stage and use them in subsequent stages.
>
>
> I'm the author of https://estafette.io/, and just like Bitbucket 
> Pipelines and Drone.io it executes steps in (public) docker containers, but 
> the only data passed from stage to stage are the files inside the working 
> directory. So downloading modules to a directory outside of the 
> working directory makes them get downloaded again in subsequent stages.
>
>
> NPM tackles this by having the node_modules directory as a local 
> subdirectory of your repository, but of course this loses you the 
> performance advantage of having a shared cache for all your repositories.
>

You can set the GOPATH to $PWD/.vendor.  It works with go1.12

I also tried with GOPATH=$PWD, but go does like it:
  $GOPATH/go.mod exists but should not
 
> [...]

Manlio

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

Reply via email to