Ubuntu的Vscode搭建go环境
Ubuntu上的vscode,安装go插件老是报错,连接不上。
Installing github.com/nsf/gocode FAILED
报错:dial tcp 142.251.43.17:443: i/o timeout
1、给go设置代理 在终端中执行
go env -w GO111MODULE=on
go env -w GOPROXY=https://goproxy.cn,direct
2、重启vscode , ctrl+shift+P 输入:go:install/update tools

全选,点击OK,安装

3、若插件还是安装失败,则需要设置vscode的代理











