https://visualstudio.microsoft.com/zh-hans/ 3. 检查Golang是否安装成功 4. 设置Golang 环境变量 go env -w GO111MODULE=on Golang1.16默认开启,1.16一下需要执行这条命令 go env -w GOPROXY=https://goproxy.cn,direct 设置七牛CDN 我的环境参考:go env -w GOBIN=C:\Go\bin 下图箭头所示为go 的b...
2、vscode自动提示需要安装插件,点击install all Tools environment: GOPATH=D:\go-project Installing 11 tools at D:\go-project\bininmodule mode. gopkgs go-outline gotests gomodifytags impl goplay dlv dlv-dap staticcheck gopls goimports 安装失败,被墙😒 3、另一种手动安装插件的方式👇 vscode 1...
go install github.com/uudashr/gopkgs/cmd/gopkgs go install github.com/ramya-rao-a/go-outline go install github.com/acroca/go-symbols go install golang.org/x/tools/cmd/guru go install golang.org/x/tools/cmd/gorename go install github.com/cweill/gotests/... go install github.com/fat...
9 tools failed to install. 可以看到有些安装成功,而golang.org/x/tools下的失败了。 go-outline: Error: Command failed: C:\Go\bin\go.exe get -u -vramya-rao-a/go-outline ramya-rao-a/go-outline(download) Fetchinghttps://golang.org/x/tools/go/buildutil?go-get=1 https fetch failed: G...
go get -u -v github.com/nsf/gocode 自动填充提示 godef go get -u -v github.com/rogpeppe/godef 寻找指定符号在go文件中的位置 godoc go get -u -v golang.org/x/tools/cmd/godoc 根据源码注释生成文档 gogetdoc go get -u -v github.com/zmb3/gogetdoc ...
Installing github.com/golang/lint/golint FAILED Installing github.com/cweill/gotests/... FAILED Installing github.com/derekparker/delve/cmd/dlv SUCCEEDED 8 tools failed to install. go-outline: Error: Command failed: D:\Go\bin\go.exe get -u -v github.com/ramya-rao-a/go-outline ...
这时候需要重启VSCode,再来一次Ctrl+Shift+P 输入Go:Install/Update Tools的操作就可以正常安装go工具了,不用快捷键也可以,进去后VSCode会提示让我们安装,直接安装所有就行,安装的依赖包会自动保存在刚才创建的Go/pkg里面,以后写代码配置的依赖包都会下载在pkg文件夹里面,所以前面不建议默认配置在c盘,还是改成其他盘好...
Installing github.com/sqs/goreturns FAILED Installing github.com/golang/lint/golint FAILED 6 tools failed to install. go-outline: Error: Command failed: C:\Go\bin\go.exe get -u -v github.com/ramya-rao-a/go-outline github.com/ramya-rao-a/go-outline (download) ...
export GOPATH=$HOME/go export PATH=$PATH:$GOROOT/bin:$GOPATH/bin “` 3. 安装Go扩展: – 打开VSCode,点击扩展按钮(左侧栏的四个方块图标),搜索并安装Go扩展。作者应为Microsoft。 – 或者,可以使用快捷键`Ctrl + P`,然后键入`ext install golang.go`来安装。
首先你必须安装 Golang 插件,然后再给 Go 安装工具包。 在VS Code 中,使用快捷键:command+shift+P,然后键入:go:install/update tools,将所有 16 个插件都勾选上,然后点击 OK 即开始安装。 Installing16tools at/Users/maiyang/develop/goworkspace//bingocode ...