Go development editor installation graphic explanation



I Go development editor

  • There are a variety of development tools. Choose an editor suitable for you, and take into account efficiency and light weight
  • There are many editors suitable for go language development, including GoLand, idea, vs code, etc
  • Even using submit, Notepad + +, vim and so on can develop go language

1. Introduction to vs Code

  •  VS Code(Visual Studio code) is an open source product of MicrosoftfreeModern lightweight code editor
  • Support almost all mainstream development languagesSyntax highlighting, intelligent code completion, custom hotkeys, bracket matching, code snippets, code comparison diff, GITOther characteristics
  • Support plug-in extensionsIt supports win, MAC and Linux platforms

2. Download and install

  • Official download address: https://code.visualstudio.com/
  • Choose more than one platform to download (I use windows here)


Double click Exe file, the next step is OK





Run after completion


Enter this interface

If you are not used to English, you can install Chinese plug-ins


After downloading, or prompt to restart the editor


Home page function introduction


Install go plug-in to make vs code support go language development


II Solution to the failure of vs code to install go language plug-in

  • Problem Description: all“FAILED
  • Reason: by the wall

Installing github.com/mdempsky/gocode FAILED
Installing github.com/ramya-rao-a/go-outline FAILED
Installing github.com/acroca/go-symbols FAILED
Installing golang.org/x/tools/cmd/guru FAILED
Installing golang.org/x/tools/cmd/gorename FAILED
Installing github.com/stamblerre/gocode FAILED
Installing github.com/ianthehat/godef FAILED
Installing github.com/sqs/goreturns FAILED
Installing golang.org/x/lint/golint FAILED

Solution: adjustGoProxy settings for language

“Win + R” opens “CMD”, and versions above “go 1.13” are enabled by default
C:\Users\Administrator>go env -w GO111MODULE=on

Set agent
C:\Users\Administrator>go env -w GOPROXY=http://goproxy.io,dire

III Common shortcut keys

  •  Ctrl + /(single line note)
  • Shift + Alt + A(multiline comment)
  • Ctrl + Shift + Enter(insert a line above, and the mouse cursor can wrap directly to the previous line at any position of the current line)
  • Ctrl + Enter(insert a line below, and the mouse cursor can wrap directly to the next line at any position of the current line)
  • Alt + Shift + F(format code. You don’t need to select all the codes. You can format it directly)
  • Ctrl + Shift + F(find file)
  • Ctrl + GThen @ + method name(location of quick positioning method)
  • Ctrl + {(click the left bracket twice in a row to quickly realize {})
  • Ctrl + D(if you need to modify several places at the same time, just Ctrl + D several times. It’s super practical

psClick to select settings:keyboard shortcuts, all shortcut key directories will pop up on the right

IV First go program

Now let’s create the first onegoTest the program:

File name "go_hello. Go"
Package main // declares the main package, indicating that it is currently an executable program

Import "FMT" // import the built-in FMT package

Func main() {// main function, which is the entry of program execution
	fmt. Println("hello word shawn hahahah!") //  Print Hello world on the terminal!

Use the terminal (or CMD) ingoUsed in the directory where the file is locatedGo run [file name]To execute the file

PS E:\go> go run .\go_hello.go
hello word shawn hahahah!


By now, the first go program has been completed. Next, we will enter the real go learning journey. Life is short, Le’s go


This is the end of this article about the installation of go development editor. For more information about the installation of go editor, please search the previous articles of developeppaer or continue to browse the relevant articles below. I hope you will support developeppaer in the future!