This is a creation in Article, where the information may have evolved or changed.
VS Code
is a Microsoft-produced editor, and Atom
, Sublime Text
Similarly, can be integrated with third-party plug-ins, here is mainly about the VS Code
configuration method, because VS Code
the code hints to do better
First make sure the plugin is installed and the reboot go
is in effect
When editing the go file, you will be prompted to install, this time can be determined to install all, over time we found that there are several plugins will fail to install, this time we need to manually install
Take Windows as an example, set up environment variables GOPATH
and git
install them by downloading the toolkit.
md %GOPATH%\src\github.com\golangcd %GOPATH%\src\github.com\golanggit clone https://github.com/golang/tools.git toolsmd %GOPATH%\src\golang.org\x\toolsxcopy /s /e %GOPATH%\src\github.com\golang\tools
- Then perform the following actions:
Go install github.com/nsf/gocodego install Sourcegraph.com/sqs/goreturnsgo install Github.com/golang/lint /golintgo Install Github.com/newhook/go-symbolsgo install Golang.org/x/tools/cmd/gurugo install golang.org/x/tools/ Cmd/gorenamego Install github.com/rogpeppe/godefgo install github.com/lukehoban/go-outline