This is a creation in Article, where the information may have evolved or changed.
The go language has been released for five years, as a beginner, the configuration of the development environment is undoubtedly the starting point, because the go language is cross-platform, so he supports all major operating systems, the following from Linux, Windows, Mac OS respectively, in fact, the go language has three ways to install, Source installation, installation package installation, tool installation. Because Bo Master is relatively lazy, temporarily does not involve the source installation.
Linux:
The first is the installation package installation, Linux users can download the address download tar.gz format of the installation package, through the terminal decompression to the specified directory, here is generally
<span style= "FONT-SIZE:14PX;" >/usr/local/go</span>
So execute the following command under the path where the installation package is located:
<span style= "FONT-SIZE:14PX;" >tar ZXVF go1.0.3.linux-amd.tar.gz-c/usr/local/go</span>
The next step is to configure path:
<span style= "FONT-SIZE:14PX;" >export path= $PATH:/usr/local/go/bin</span>
After executing the go on the terminal, the installation succeeds if it displays information about go. If not, configure the path path from the new.
Then the third-party tool installation, this is relatively simple:
If you're under Ubuntu, you're using the Apt-get command,
<span style= "FONT-SIZE:12PX;" >sudo apt-get Install Python-software-propertiessudo add-apt-repository ppa:gophers/gosudo apt-get Updatesudo Apt-get Install golang-stable Git-core mercurial</span>
By the way installed Git mercurial installed, for later convenience.
Windows:
Windows and above, first installed with the installation package, also go to Google code to download the installation package. Download to the computer and then perform the installation directly. It is recommended to install by default and do not modify the installation directory. Verify the same method as above, run go in cmd and check that go information will not appear. If not, try a new installation or restart.
Mac OS:
Mac OS is also relatively simple, also go to Google code to download the appropriate installation package, the next installation success. Open the terminal and run go to check if the installation was successful.
There is a management software tool homebrew under Mac OS, which is also relatively simple to install:
<span style= "FONT-SIZE:12PX;" >brew update&&brew upgradebrew Install gobrew install gitbrew install mercurial</span>
The above is the way the GO environment is installed on each platform.