Go (or golang) is a programming language initially developed by Google. It is a statically-typed language with syntax loosely derived from that of C, adding garbage collection, type safety, some dynamic-typing capabilities, additional built-in types such as variable-length arrays and key-value maps, and a large standard library. More information @ Wikipedia.
Until Canonical's Ubuntu Developer Tools Center gets support for golang, you can use a script created by WebUpd8 reader +George, which can be used to set up everything Go-related in Ubuntu. The script downloads and installs the latest version of Go compiler and IDE (LiteIDE) in Ubuntu and it also automatically sets up most of the tings you'll need:
- creates a simple layout for the IDE;
- sets the GOPATH;
- lot of gophers use Monaco font so the script will install it for usage with LiteIDE;
- adds the golang IDE (LiteIDE) shortcut to the Unity Launcher with a few of useful quicklists;
- under other desktop environments, it adds the LiteIDE shortcut on the desktop (and of course, it can also be accessed from the menu);
- adds Git support in the IDE on ctrl+` (you need to setup Git before using this though);
- extended project templates.
|LiteIDE under Ubuntu 14.04 (Unity)|
George says he initially created this script to help a kid who wanted to start learning Go to set up everything that was needed. However, the script got a few extra features since then and it can also be used by advanced users who should appreciate the easy and fast golang environment setup.
Download and setup
Download the golang compiler and LiteIDE installer / setup script from HERE
Once downloaded, extract the archive and simply double click on the "gopei" executable and click "Run" (or run it via command line). Of course, feel free to checkout the script before running it to make sure it doesn't do anything you don't want/need.
Note that in recent Ubuntu versions, Nautilus doesn't ask to run a script when double-clicked and instead, it opens it with a text editor by default. To change this behavior and set Nautilus to ask if it should run a script when double-clicked, use the following command:
For Nemo, use:
gsettings set org.gnome.nautilus.preferences executable-text-activation ask
gsettings set org.nemo.preferences executable-text-activation ask
Note: to update the golang compiler, LiteIDE, etc., simply run the script again.
Thanks to George for the tip!