在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
https://github.com/nsf/gocode https://github.com/rogpeppe/godef https://github.com/zmb3/gogetdoc https://github.com/lukehoban/go-outline https://github.com/tpng/gopkgs https://github.com/newhook/go-symbols https://github.com/cweill/gotests/ https://github.com/golang/lint https://github.com/sqs/goreturns
上面插件下载完成后拷贝到GOPATH指定的目录的src/下,如gocode拷贝到github.com/nsf/目录下,然后执行下面命令: go install github.com/nsf/gocode go install github.com/rogpeppe/godef go install github.com/zmb3/gogetdoc go install github.com/golang/lint/golint go install github.com/lukehoban/go-outline go install sourcegraph.com/sqs/goreturns go install golang.org/x/tools/cmd/gorename go install github.com/tpng/gopkgs go install github.com/newhook/go-symbols go install github.com/cweill/gotests/... go install golang.org/x/tools/cmd/guru 另外,在install goreturns时遇到点问题,貌似说goreturns找不到的问题,我直接把sqs/goreturns拷贝一份到github.com目录下,再次运行install命令就可以了。 执行成功后,会在bin目录下生成一系列.exe命令:
vscode配置,设置goroot、GOPATH:文件--首选项--工作区设置, 如果需要在vscode中调试go程序,需要下载安装dlv :https://github.com/derekparker/delve go install github.com/derekparker/delve/cmd/dlv 至此,vscode中环境搭建完毕,再次敲入代码就会有自动提示功能了。 启动文件配置:
|
请发表评论