Dnia 2020-03-11, o godz. 08:22:46
"'Bryan C. Mills' via golang-nuts" <golang-nuts@googlegroups.com> napisał(a):

> (But note that you can always set up a local HTTP server using the remote 
> import path <https://golang.org/cmd/go/#hdr-Remote_import_paths> protocol, 
> and use a local DNS entry and the GOPRIVATE environment variable to tell 
> the Go command where to find the repo.)

The very need for such a workaround tells that something is severely broken.

1. set up local server just to serve what GOPATH provided seamlessly

2. tinker with your /etc/hosts or c:\Windows\System32\Drivers\etc\hosts or 
/private/etc/hosts.
Do it **every time** you want to work locally on a module from other domain.

3. Reconfigure hosts and your local web server **every time** you want to work 
locally
on a next module. Keep all these configs forever, because you may need to 
maintain your
patches

4. do not forget to set up GOPRIVATE, otherwise you will leak to the outer world
rinse and repeat on any host you do tests etc

We need to dance this quadrille because go tools won't look at the
go.mod.local (https://github.com/golang/go/issues/26640)

Unfortunately "go.mod.local" was not invented at Google, so chances we
would ever have sane G-independent setup are miniscule now. Mind also
that GOPATH is now led to the guillotine, to force all this "local server / 
crafted hosts / GOPRIVATE setup" fun on everyone not willing to share
her development setup with the big G.

my ¢2

-- 
Wojciech S. Czarnecki
 << ^oo^ >> OHIR-RIPE

-- 
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/20200312161646.5c19d89d%40xmint.

Reply via email to