This is a creation in Article, where the information may have evolved or changed. See the development environment configuration for Golang and the IDE configuration article good, I have already practiced. deletion of the original text Original address: http://blog.csdn.net/shuideyidi/article/details/38390809
1. Download and install the Go installation package=========================================================== in Csdn uploaded my version for everyone to download: ================================ ===========================
Go1.2.windows-386.msi: http://download.csdn.net/detail/shuideyidi/7718563
Go1.2.1.windows-amd64.msi: http://download.csdn.net/detail/shuideyidi/7719735
go1.2.1.darwin-amd64-osx10.8.pkg: http://download.csdn.net/detail/shuideyidi/7719779
go1.2.1.linux-amd64.tar.gz:http://download.csdn.net/detail/shuideyidi/7719867
Note: Never show Chinese in the installation path. Otherwise, the Go Language development tool will not work properly
2. Configure environment Variables
(1). New variable name: GOBIN variable Value: C:\go\bin
(2). New variable name: Goarch variable Value: 386(note that the 64-bit operating system is AMD64)
(3). New variable name: GOOS Variable Value: Windows
(4). New variable name: Goroot variable Value: C:\go
(5). Edit path at the end of the variable value of path plus%gobin%
If it is an MSI installation file, the Go Language environment variable will be set automatically. If the subsequent tests fail, you can reset the environment variables. I installed the MSI, found that the GO command is not recognized, look at the environment variables, found only path and Goroot, the other two did not, so they built and set up a bit, the test passed. 3. test whether the installation was successful Open a command prompt in Windows (Cmd.exe) to execute the command:Go version or go Help will normally show:
5. Developing the IDE for Go1) LiteideDownload Address: http://sourceforge.net/projects/liteide/files/
Website
Source Code Https://github.com/visualfc/liteide
Binary Downloads Http://sourceforge.net/projects/liteide/files
Google Group Https://groups.google.com/group/liteide-dev
Support Liteide Http://visualfc.github.com/support
How to Install https://github.com/visualfc/liteide/blob/master/liteidex/deploy/welcome/en/install.md
Changes https://github.com/visualfc/liteide/blob/master/liteidex/deploy/welcome/en/changes.md
What I have downloaded is:Liteidex23.1.windows.zip
Run directly after installation and switch and configure liteide currently used environment variables based on the current system (I am a Windows 32-bit operating system):
Step: Click on the menu bar "View", click "Edit Environment variable", enter and edit the win32.env file:
# Native Compiler Windows 386
Goroot=d:\go
#GOBIN =
Goarch=386
Goos=windows
Cgo_enabled=1
path=c:\mingw32\bin;d:\go\bin;%path%
Liteide_gdb=gdb
Liteide_make=mingw32-make
liteide_term=%comspec%
liteide_termargs=
liteide_exec=%comspec%
Liteide_execopt=/c
Original:Goroot=c:\go To modify the current go to the installation path, modify the direct save can be done.
If it is a 64-bit operating system: GOARCH=AMD64
Configuring Gopath settings, the Go language toolchain uses Gopath settings, is a list of the project paths developed by the Go language, enter go help gopath Quick View Gopath documents in the command line (also via CTRL +, bring up command input in liteide). The Gopath can be easily viewed and set in Liteide. From the menu-view-gopath settings, you can view the list of Gopath that already exist on your system, and add the project directory to your custom Gopath list as needed.
Use Liteide to develop a simple go language application example: (a) Set Gopath menu-View-admin gopath-go to admin interface-"Add directory"-add "F:\workplaceOfGo" to "Custom Directory"-click "OK" (B) Use the wizard to establish the Testdemo project template select Go1 Command project,gopath Directory Select "F:\workplaceOfGo", project name add Testdemo OK and load Testdemo project, This will automatically generate and load a simple Hello World project, Ctrl+r run directly: Will output: Hello world!