VS Code for Golang 环境搭建
1、安装golang sdk
2、安装VS Code
3、安装各种插件,安装方式如下:
在线下载安装插件:
go get -u -v github.com/golang/lint/golint
go get -u -v github.com/nsf/gocode
go get -u -v github.com/acroca/go-symbols
go get -u -v golang.org/x/tools/cmd/guru
go get -u -v golang.org/x/tools/cmd/gorename
go get -u -v github.com/josharian/impl
go get -u -v github.com/sqs/goreturns
go get -u -v github.com/rogpeppe/godef
go get -u -v github.com/tpng/gopkgs
go get -u -v github.com/derekparker/delve/cmd/dlv
go get -u -v github.com/cweill/gotests/...
下载插件源码,并将其放在指定目录下,然后在本地安装:
go get -v github.com/golang/lint/golint
go get -v github.com/nsf/gocode
go get -v github.com/acroca/go-symbols
go get -v golang.org/x/tools/cmd/guru
go get -v golang.org/x/tools/cmd/gorename
go get -v github.com/josharian/impl
go get -v github.com/sqs/goreturns
go get -v github.com/rogpeppe/godef
go get -v github.com/tpng/gopkgs
go get -v github.com/derekparker/delve/cmd/dlv
//注意:delve/cmd/dlv只支持64位
//否则报错:github.com\derekparker\delve\pkg\proc\disasm.go:9: undefined: ArchInst
go get -v github.com/cweill/gotests/...
//此语句需要分别执行如下安装命令:
go get -v github.com/cweill/gotests/internal/output
go get -v github.com/cweill/gotests/internal/goparser
go get -v github.com/cweill/gotests/internal/input
go get -v github.com/cweill/gotests/internal/models
go get -v github.com/cweill/gotests/internal/render
go get -v github.com/cweill/gotests/internal/render/bindata
go get -v github.com/cweill/gotests/testdata
go get -v github.com/cweill/gotests/gotests/process
go get -v github.com/cweill/gotests/gotests
有疑问加站长微信联系(非本文作者)