This is a creation in Article, where the information may have evolved or changed.
Configure go language environment variables
1, download the latest version of the ZIP package (currently 1.5.1)
2, extract to any directory without Chinese spaces, such as c:/go/
3, tap, My Computer, properties, advanced system settings, environment variables, system variables
4, click the New button, variable name input goroot, variable value input c:/go/
5, find the path variable, add at the end;%goroot%/bin; note the semicolon
6, press the key combination, win+r, enter cmd, press ENTER, you can open the Command line window
7, enter go version in the Command line window to see the corresponding information
8, Configuration complete
install Go-lang-plugin for IntelliJ idea
* * Description **go-lang-plugin GitHub website: https://github.com/go-lang-plugin-org/go-lang-idea-plugin
The following methods for installing plugin are tested.
Test a, download the master source code from GitHub, and when you import IntelliJ idea, it's stuck in gradle.
Test Two, download the 0.9.15 version from GitHub, there is a mistake when importing IntelliJ idea,build normally, after deleting the error line, build passes, can also import the plugin, but when setting up the Go SDK, it is always unrecognized.
Test Three, download the 0.9.16-alpha.9 version from GitHub, import the IntelliJ idea,build normally, or import the plugin, but it is still not recognized when the Go SDK is set.
test Four, the normal installation of plugin, the steps are as follows:
It's a pity.In the Windows version of IntelliJ idea, it is not possible to debug the Go lang breakpoint ...
1, open file-settings-plugin, such as
2, click, browse repositories, as
3, click, Manager repositories, such as
4, click the plus sign in the top right corner, add the new repository, the address is
https://plugins.jetbrains.com/plugins/nightly/5047
5, after determining, will return to the last window, as shown, select the new repository after the Go-lang-plugin will be displayed, click on the right side of the install. Network reasons, sometimes can be wrong, more than a few times on it.
6, after online installation, will prompt to restart IntelliJ idea
7. After restarting IntelliJ idea, press the operation
8, pop up the following window
9, click, the upper left corner of the plus sign, pop up as, select the Go SDK, this option must be installed Go-lang-plugin before it appears.
10, select your Goroot directory, after the operation is completed, such as, indicating that the operation was successful.
let's try to create a go project.
1,file, new project, open the following window and select Go
2, click Next, like After, pop up as
3, choose your Go project directory, choose, as
4, click Finish, pop up as
5, select New window, pop up as
6, note, be sure to select Go-workspace, as shown in the operation
Note that after clicking on the new folder, enter SRC, then select the SRC directory, then click on the top of the source button to make this directory a source code directory, and then press the operation
OK, you can write go lang code, send a few hints to enjoy it
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.