This is a creation in Article, where the information may have evolved or changed.
- Http://www.golangtc.com/download downloading an installation package or a compressed package
- Configuring Environment variables
- Configuration goroot:
- Configure path: Last added in Path
- Configure the role of Gopath:gopath please Baidu, the specific directory can be defined by their own
- Required extensions
- Code autocomplete (using Gocode)
- Quick Tip information (using GODEF)
- Jump to Definition (using GODEF)
- Search references (using go-find-references)
- Document Outline (using Go-outline)
- Renaming (using Gorename)
- Save build (using Go build and go test)
- Code formatting (using Goreturns or Goimports or gofmt)
- Debug code (using delve)
- Install the extension (skip this step if you are using Visual Studio Code)
- Code completion extension, execution on the command line (example, other plugins same)
Go get-u-ldflags-h=windowsgui Github.com/nsf/gocode
Go Install Github.com/nsf/gocode
- Install Editor
- download vs code (rating vs Code): https://www.visualstudio.com/en-us/products/code-vs.aspx
- Press CTRL +shift+p, enter install, select
- after selection will scan the expansion pack, this process will be slow, and so on after the extension package list to choose Go.
- When you select the go language, the lower-right corner prompts the
- to click on the prompt above and click Install (the best sail in the process * * Qiang)
- Reinstall process will not find tools under Some of the extensions. Execute "git clone https://github.com/golang/tools.git" on the command line (you need to install git earlier)
- to move the cloned Tools folder to C:\Go\GOPATH\ The
- in the src\golang.org\x file performs 4, 5 steps again. Restarting vs code
- vs code itself does not debug go code, it needs to install the Go delve plugin to debug.
- executes "go get -u -v github.com/derekparker/delve/cmd/dlv" on the command line. OK, so you can debug it here.