On Tue, Jan 12, 2021 at 1:49 PM Kevin Chadwick <m8il1i...@gmail.com> wrote:

> Maybe I need to look into -mod vendor as I didn't know that existed.
> Otherwise
> disconnect your internet and then import a folder of local .go files that
> you
> use in multiple projects?
>

Ah, I see. I agree that this could be simpler. I just filed
https://github.com/golang/go/issues/43646 to that effect. I also describe a
workaround there: Set `GOPROXY=file://$GOPATH/pkg/mod/cache/download`.
Note, that this is essentially one of the workflows suggested here (which I
would consider the canonical documentation for the "eng org wants to
onboard Go" case):
https://golang.org/ref/mod#private-modules
In particular, the "private proxy serving all modules
<https://golang.org/ref/mod#private-module-proxy-all>" section says:

There are several existing implementations of GOPROXY servers that may be
> used this way. A minimal implementation would serve files from a module
> cache directory and would use go mod download (with suitable configuration)
> to retrieve missing modules.


i.e. a minimal version of this enterprise proxy would be an NFS share that
gets mounted on the clients, set via GOPROXY and downloaded into via `go
mod download`.


> --
> 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/448d0354-65b5-4d0c-1566-88603fd9052e%40gmail.com
> .
>

-- 
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/CAEkBMfFX-JpXA%2BPLW0mvQ8AckfJD5Uo3qR9qz3XCTr3cNfWHYw%40mail.gmail.com.

Reply via email to