VSCode
For VScode installation tutorial, see: VScode Tutorial | Newbie Tutorial
Then we open the VSCode extension (Ctrl+Shift+P):
Search go:
Click Install. After the installation is complete, we can use functions such as code prompts, testing, and debugging.
GoLand
GoLand is the Go language IDE of the Jetbrains family and has a 30-day free trial period.
Installation is also very simple. Visit Goland's download page and download the corresponding software according to the three major platforms (Mac, Linux, Windows) of your current system environment.
LiteIDE
LiteIDE is an open source, cross-platform lightweight Go language integrated development environment (IDE).
Supported operating systems
- Windows x86 (32-bit or 64-bit)
- Linux x86 (32-bit or 64-bit)
Download address: liteide - Browse Files at SourceForge.net
Source code address: https://github.com/visualfc/liteide
Eclipse
Eclipse is also a very commonly used development tool. The following describes how to use Eclipse to write Go programs.
Eclipse edits the main interface of Go
- First download and install Eclipse
- Download the goclipse plug-in https://github.com/GoClipse/goclipse/blob/latest/documentation/Installation.md#installation
-
Download gocode, code completion tips for go
Gocode's github address:
https://github.com/nsf/gocode
To install git under Windows, msysgit is usually used .
Then install it under cmd:
go get -u github.com/nsf/gocode
You can also download the code and compile it directly with go build, which will generate gocode.exe
- Download MinGW and install it as required
- Configure plugin
Windows->Reference->Go
(1) Configuring the Go compiler
Set up some basic information for Go
(2) Configure Gocode (optional, code completion) and set the Gocode path to the previously generated gocode.exe file
Set gocode information
(3) Configure GDB (optional, for debugging), and set the GDB path to the gdb.exe file in the MingW installation directory
Set GDB information
-
Was the test successful?
Create a new go project and create a hello.go. As shown below:
New project editing file
Debugging is as follows (you need to enter commands in the console to debug):
Figure 1.16 Debugging Go program