Go语言实践Go

Ubuntu/Mint配置VSCode Go插件

2019-07-17  本文已影响1人  霡霂976447044

先在VSCode安装go插件。
两种方法可以实现

1 下载go语言的代码提示等包 编译安装

下面是需要下载即安装

cd ~/go/src/golang.org/x/

git clone https://github.com/golang/tools.git
git clone https://github.com/golang/lint
git clone https://github.com/golang/net
git clone https://github.com/golang/text
git clone https://github.com/golang/crypto
git clone https://github.com/golang/sys



cd  /go/src/github.com/
git clone https://github.com/ramya-rao-a/go-outline.git ramya-rao-a/go-outline
git clone https://github.com/acroca/go-symbols.git ./acroca/go-symbols
git clone https://github.com/rogpeppe/godef.git rogpeppe/godef
git clone https://github.com/sqs/goreturns.git sqs/goreturns
git clone https://github.com/cweill/gotests.git cweill/gotests
git clone https://github.com/josharian/impl.git josharian/impl
git clone https://github.com/go-delve/delve.git go-delve

git clone https://github.com/golang/lint.git golang/lint
git clone https://github.com/mdempsky/gocode.git mdempsky/gocode
git clone https://github.com/uudashr/gopkgs.git uudashr/gopkgs
git clone https://github.com/stamblerre/gocode.git stamblerre/gocode



echo 'install'
go install github.com/mdempsky/gocode
go install github.com/ramya-rao-a/go-outline  # 大纲

go get github.com/karrick/godirwalk
go get github.com/pkg/errors
go install github.com/uudashr/gopkgs/cmd/gopkgs  # 导报

go install github.com/sqs/goreturns

go install github.com/rogpeppe/godef  # 转到定义

go install golang.org/x/tools/cmd/gorename

go install golang.org/x/tools/cmd/guru

go install github.com/acroca/go-symbols

go install github.com/cweill/gotests/gotests

go install github.com/josharian/impl

go install golang.org/x/lint/golint

go install github.com/derekparker/delve/cmd/dlv  # debug

2 下载我编译好的Linux64位二进制文件,拷贝到$GOPATH/bin

链接: https://pan.baidu.com/s/1a0V_nsGwUxHTgLF-oyfUBQ 
提取码: r636 

然后将里面的文件复制到go的bin目录


截图_2019-07-18_09-04-46.png
上一篇 下一篇

猜你喜欢

热点阅读