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)
1) Install Gocode
go get -u -v github.com/nsf/gocode
2) Install Godef
go get -u -v github.com/rogpeppe/godef
3) Install Golint
go get -u -v github.com/golang/lint/golint
4) Install Go-find-references
go get -u -v github.com/lukehoban/go-find-references
5) Install Go-outline
go get -u -v github.com/lukehoban/go-outline
6) Install Goreturns
go get -u -v sourcegraph.com/sqs/goreturns
7) Install Gorename
go get -u -v golang.org/x/tools/cmd/gorename
- 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 the selection will scan the expansion pack, this process will be slow, and so on after the expansion package list to choose Go.
- Select the Go language and the bottom right corner will prompt
- Click on the tip above to see this prompt, click Install (The best sail in this process * * Qiang)
- The reinstallation process will report that some extensions under tools are not found. Execute "git clone https://github.com/golang/tools.git" on the command line (need to install git in advance)
- Move the cloned Tools folder to C:\Go\ The
-
- vs code itself does not debug go codes, it needs to install the Go delve plugin to debug.
-