Skip to content

Creates a go distribution with an altered go executable that auto sets the golang variables (GOROOT, GOPATH and GOBIN),

License

Notifications You must be signed in to change notification settings

programingjd/golang_go_proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How to use:###

  • Run install.bat on windows or install.sh on linux and osx.

This creates a go directory with the golang distribution with an altered go executable.

  • Copy the go directory wherever you want ($godir) and add $godir/bin to your PATH.

You can then use go without setting GOROOT, GOPATH or GOBIN.


The original go executable is replaced with a wrapper that sets those variables for the process only, and then calls the real go executable (renamed _go).

GOROOT is deduced from the location of the go executable in the PATH.

For the GOPATH, it looks for a directory called src, starting from the current directory and then looking up. If it can't find any, the current directory is used.

GOBIN is set to $GOPATH/bin.

About

Creates a go distribution with an altered go executable that auto sets the golang variables (GOROOT, GOPATH and GOBIN),

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published