1.默认安装vscode软件,菜单栏上:查看->扩展 ;搜索chinese插件并安装使用;安装git;安装go。

    2.vscode的扩展搜索go安装go扩展

    3.go库代理
    git bash上执行
    go env -w GO111MODULE=on (后面改为auto,否则vscode一直报错)
    go env -w GOPROXY=https://goproxy.io,direct
    或**go env -w GOPROXY=https://goproxy.cn,direct**

    4.https://github.com/golang/vscode-go/blob/master/docs/tools.md上安装go相关的插件,以下命令是从插件筛选汇合的所有插件安装
    (1)插件下载(可在git bash里执行这些,不能下载的在对应目录下git clone,然后解压文件夹去掉master名字)
    go get -d github.com/ramya-rao-a/go-outline
    go get -d github.com/newhook/go-symbols
    go get -d github.com/mdempsky/gocode
    go get -d github.com/rogpeppe/godef
    go get -d github.com/zmb3/gogetdoc
    go get -d github.com/fatih/gomodifytags
    go get -d github.com/sqs/goreturns
    go get -d github.com/cweill/gotests/…
    go get -d github.com/josharian/impl
    go get -d github.com/haya14busa/goplay
    go get -d github.com/uudashr/gopkgs/cmd/gopkgs
    go get -d github.com/davidrjenni/reftools/cmd/fillstruct
    #debug调试
    go get -d github.com/go-delve/delve/cmd/dlv
    (2)插件安装
    go get github.com/ramya-rao-a/go-outline
    go get github.com/newhook/go-symbols
    go get github.com/mdempsky/gocode
    go get github.com/rogpeppe/godef
    go get github.com/zmb3/gogetdoc
    go get github.com/fatih/gomodifytags
    go get github.com/sqs/goreturns
    go get github.com/cweill/gotests/…
    go get github.com/josharian/impl
    go get github.com/haya14busa/goplay
    go get github.com/uudashr/gopkgs/cmd/gopkgs
    go get github.com/davidrjenni/reftools/cmd/fillstruct

    go get github.com/go-delve/delve/cmd/dlv
    #go get -d github.com/alecthomas/gometalinter已封存,使用golangci-lint
    curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s — -b $(go env GOPATH)/bin v1.32.2
    golangci-lint —version

    5.https://github.com/golang/上搜索相关mirror下载安装需要的库(golang.org不能访问下载库,手动下载)
    (1)go env找到你的GOPATH,手动创建C:\Users\15775\go\src目录下的\golang.org\x,在这目录下右键打开git bash
    git clone https://github.com/golang/net.git
    git clone https://github.com/golang/text.git
    git clone https://github.com/golang/sys.git
    git clone https://github.com/golang/sync.git
    git clone https://github.com/golang/tools.git
    git clone https://github.com/golang/crypto.git
    git clone https://github.com/golang/lint.git
    **
    6.如果出现下面编辑器错误,不用管,也可以建立目录打开,执行命令
    go mod init xxxx

    **