This is a creation in Article, where the information may have evolved or changed.
In the first section, the small partners have learned to install the SDK for the go language and how to install the support plugin for the Go language in eclipse, and the attentive little partner will find that writing the code is particularly tiring. Can it be swollen without the automatic code completion function? OK, don't worry, let's study together now. Let the code fly up and let the go language become fun.
What are we going to do?
We're going to install the tools three widgets under the Go module and turn on the debug feature. Code gocode
Auto-complete program, Code guru
Navigation program, godef
code jump Program (CTRL + left mouse click, view defined code), gdb64
support Debug program. Well, let's look at the results of the implementation, such as:
After the completion of the
Debug Configuration
Second, what are we going to do?
1, download Gocode source code github.com/nsf/gocode
, and then unzip the file, then rename the Mileage folder modified to Gocode, of course, you can also do not modify, and so on, and then directly modify the file name after compiling XXXX.exe
. If you have a git admin tool installed, you can use git to download it.
Compiling the Gocode file
Look at the effect
Compilation succeeded
Next, you can copy the Gocode to the Go installation directory bin file, my directory is installed on the e disk, so directly copied to E:\Go\bin
.
2, download Guru source code, https://github.com/golang/tools
and then in the Go installation directory src directory to create a new golang.org/x/tools/cmd/guru
folder, and then the extracted source copy of the past, such as:
1. New File
Then unzip the tools-master.zip
file, and copy all the files under the Tools-master folder, one is not spared, paste to just now we are in the Go installation path SRC under the new folder. Then the command line into the SRC directory, and then enter the command to start compiling go install golang.org/x/tools/cmd/guru
, check whether the compilation is successful, directly to the bin directory to view.
Compiling the Guru file
Because Godef relies on 9fans, so first install 9FANS.NET/GO/ACME (the directory needs to be created in SRC, the source code in the https://github.com/9fans/go
download, as long as the extracted files copied past on the line).
3. Download Godef source code, as above, github.com/rogpeppe/godef
unzip the file, and then create a new folder under the SRC directory below E:\Go\src\github.com\rogpeppe\godef
, then copy the extracted file contents to the new folder, and finally the command line to enter the compile command go install
, done.
Compiling the Godef file
Operation here, we have completed the first half of the task, the next is to open the path of eclipse set, I believe that the small partners will certainly, so this side omitted this operation. (^__^) hehe ...
4, download gdb64.exe
, and then unzip the file, find the bin directory gdb file, according to their own computer operating system to choose 32-bit or 64-bit files, my side is a 64-bit system, so choose gdb64.exe
to go to the directory bin file.
https://nchc.dl.sourceforge.net/project/liteide/X31/liteidex31.windows-qt4.zip
To start the GDB configuration, select the following configuration item.
Start the Debug configuration
Configuration path
Jiangzi, our Eclipse development environment is configured to complete.
PS: do not worry about the problem, careful think more try to try just fine. Hope that the small partners can happily learn the go language.