Basically installing Go working environment mean downloading compiler from https://golang.org doing some things with PATH and GOPATH (where many stuck here) and installing an IDE. Are a lot of tutorials around but let see a smart tool who can make our life better.
We talk about Unix/Linux world so make sure you have a Mac or a Linux distro with
git installed. If you don't have a github.com account make one. I typically use it on Ubuntu but Gopei should work with any machine which has
We will use Gopei (Go Programming Environment Installer) toolbox. This tool born about 4 years ago from desire to start learning programming and Unix/Linux commands was discouraging. A new easy way to do things was needed.
Gopei is an installer and an customizer for entire Go environment to bring a new easy and better experience for new users. Gopei install Go compiler, LiteIDE (a very lite and quick IDE made for Go language) set PATH, GOPATH and link all toghether. Also come with some tools for github and cloud (for advanced users).
Gopei options are very well documented on project wiki.
First of all download Gopei toolbox from here in your local
Downloads folder, unpack and execute
Downloads/tools-master/gopei -h Golang Programming Environment Installer Usage: gopei [options] Options: -c enable classroom mode (Linux only) -g enable git suppport -h show this help message and exit -k show key fingerprint -s server mode, install golang only -u uninstall -U uninstall including .gitconfig file and .ssh folder -q [name] set theme (eg. -q webstorm) -x [name] set color scheme (eg. -x sublime) -v version
Basically you will need to go in Downloads (but not mandatory) folder and run
-g is for github. Use if you want to work with github repos.
After installation on some systems you will have a desktop or launcher icon with a nice gopher for IDE. On systems with dash (like Gnome) you will need to search there for. On Mac you will have original IDE icon on dock bar.
If you want to use other IDE (like VSCode,Atom,Sublime or whatever) consider using this command
-s is for server mode (no default IDE). Now you can install your favorite IDE and Go compiler but also Gopei toolbox (like cloud tool) will be available from your IDE or from Terminal.
Another interesting mode is classroom. Install with
-c flag any setting you make in the IDE are lost at closing. Useful if the people learning, play in the IDE and you want to reset at default.
Let say now you have many instalations and you want to locate your local key in github keys list. This is hard job because github don't allow you to give a name for each key. So use
and you will see the local machine ssh key fingerprint.
Uninstalling has two options. The main difference is that
-U also delete
.ssh folder. Usually uninstall with
-u if you want just to update tools.
Another new options added in Gopei version 2 are setting a very polished themes also designed for big screens. Set theme from installation with
./gopei -g -q webstorm -x sublime
Hope you will find this tool useful. Enjoy.