Go language Download, installation, configuration

Source: Internet
Author: User
Tags windows 10 enterprise
This is a creation in Article, where the information may have evolved or changed.

First, go language download

Official go language download address: https://golang.org/dl/

Find the right version for your system download, I downloaded the version of Windows. You can also download the source yourself for a deeper study of the go language.

Second, go language installation

When the download is complete, double-click Go1.6.windows-amd64.msi to install.

If the installation process has the following prompt:

Run cmd as administrator, locate the directory where Go1.6.windows-amd64.msi is located, and enter msiexec/i Go1.6.windows-amd64.msi such as (placed in the D packing directory):

Step one: Double-click to run the Setup program

Step two: Click Next to appear license

Select I accept the terms in the License agreeement.

Step three: Click Next to select the installation path

Default C:\Go\

Step four: Click Next to install

Click the Install button for installation

Step five: Wait patiently until the following interface

Click Finish to complete the installation.

Third, after the installation directory description

After the Go language installation, the C:\Go directory has a total of 9 directories and 9 files, such as:

API -directory containing all API lists for easy access by the IDE

bin-directory, storing compiled executable files


Doc-directory, help documentation



pkg-directory, which holds the compiled package file. The files in the pkg are generated by Go compilation

src-directory, storing project source files

Note: In general, bin and pkg directories can not be created, the GO command will be created automatically (such as Go install), only need to create the SRC directory.

authors-file, author list, open with Notepad




license-file, LICENSE, open with Notepad



robots.txt-file, use Robots.txt to block access to URLs, see Https://support.google.com/webmasters/answer/6062608?hl=zh-Hans for details

version-file, version information, open with Notepad

Iv. Setting the GO environment variable

Official documents:

If you chose a directory of other than c:\Go , you must set the GOROOT environment variable to your chosen path.

ADD bin The subdirectory of your Go root (for example, c:\Go\bin ) to your PATH environment variable.

Setting Environment variables under Windows

Under Windows, you could set environment variables through the "Environment variables" button on the "Advanced" tab of the " System Control Panel. Some versions of Windows provide this control panel through the "Advanced system Settings" option inside the "SYSTEM" cont Rol panel.

The setup steps are as follows (Windows 10 Enterprise Edition):

Find: My Computer, right click, open "Properties"

Select "Advanced System Settings"

Pop-up the following dialog box and select the "Advanced" tab:

Click on the "Environment variables" button to pop up the variable settings window:

"New" System variable:

Set variable name goroot, variable value C:\Go\ (installation directory)

Modify the system variable path, add C:\Go\bin\

After setting the environment variable, enter go at the command line:

Press ENTER:

If you view version, run go version

V. Summary

Go language installation is relatively simple, after successful installation to configure the runtime environment variables, similar to java.

You will then continue on to the Go Language tour.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.