You can also try using workspace support implemented in Go 1.18. Create a go.work file in ~go/pkg using `go work init` and add all your modules using `go work use -r .`
Manlio Perillo On Monday, April 25, 2022 at 11:38:36 PM UTC+2 darse...@gmail.com wrote: > Sean. Brilliant. I don't grasp how I missed the file:// setting. Works > beautifully and I am a grateful Gopher. THANK YOU. > > On Monday, April 25, 2022 at 5:15:33 PM UTC-4 se...@liao.dev wrote: > >> See https://go.dev/ref/mod#environment-variables >> >> GOPROXY=file://$(go env GOMODCACHE)/cache/download >> >> - sean >> >> >> On Mon, Apr 25, 2022 at 10:08 PM David Arsenault <darse...@gmail.com> >> wrote: >> >>> Hello. I was hoping to get some smart advice on a problem using go on a >>> closed network. >>> >>> Summary: >>> - closed network, no outside access (painful, I know) >>> - moved all needed packages to ~/go/pkg... >>> - using go modules >>> >>> Problem: >>> go mod insists on using the network (can't). When I set GOPROXY=off go >>> mod tidy yells then quits: >>> >>> github.com/Jeffail/gabs/v2: cannot find module providing package >>> github.com/Jeffail/gabs/v2: module lookup disabled by GOPROXY=off >>> >>> I've tried using replace in go.mod. Same failures. If GOPROXY=off, above >>> error. If GOPROXY is set to default values it fails on network access. >>> >>> It would be fantastic if there were a way to use go mod and have it look >>> locally first before trying the network. I don't see a way to do that in >>> the docs. I even tied -pkgdir dir from the go build docs and that fails >>> with network access. >>> >>> Is there a potential that my go install is somehow broken? >>> >>> I suppose I could vendor everything but it would be better if the tool >>> would find the packages already copied to the closed network. >>> >>> Pulling my hair out. Thanks in advance for your advice Gophers! >>> >>> David >>> >>> -- >>> 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...@googlegroups.com. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/golang-nuts/4a400763-dddb-46d7-abf4-2beb711e1287n%40googlegroups.com >>> >>> <https://groups.google.com/d/msgid/golang-nuts/4a400763-dddb-46d7-abf4-2beb711e1287n%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >> -- 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/13bb405c-8bbb-4104-b638-d9b0e6dce8e4n%40googlegroups.com.