0

I'm having a trouble mapping some go modules imported from github.com locally in an offline environment. I thought of changing GOPROXY into a file path, that contains the folder of the previously installed packages. Is that possible?

Thanks!

OS: Linux

M Al
  • 1

1 Answers1

0

Yes it is.

You can set the GOPROXY to the target directory as an example to the directory: file://C:/gopath/pkg/mod/cache/download

For more info: see this thread

Prakash P
  • 3,582
  • 4
  • 38
  • 66
  • Firstly, thank you for your response I'm glad to know that it is possible. I see you responded with windows path structure what about Linux? kindly, let me know if you have any idea? – M Al May 25 '22 at 09:35
  • @MAl, why wouldn't it work with a unix path? (It is probably more useful to link to the [documentation](https://pkg.go.dev/cmd/go#hdr-Module_proxy_protocol) rather than a closed GitHub issue specifically about windows) – JimB May 25 '22 at 15:33