Is it possible to set GOPROXY=/file.. in Linux

677 Views Asked by At

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

1

There are 1 best solutions below

2
On

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