vscode 安装go插件

参考:

https://github.com/goproxy/goproxy.cn/blob/master/README.zh-CN.md

https://goproxy.cn/

Installing github.com/nsf/gocode FAILED
Installing github.com/uudashr/gopkgs/cmd/gopkgs FAILED
Installing github.com/ramya-rao-a/go-outline FAILED
Installing github.com/acroca/go-symbols FAILED
Installing golang.org/x/tools/cmd/guru FAILED
Installing golang.org/x/tools/cmd/gorename FAILED
Installing github.com/fatih/gomodifytags FAILED
Installing github.com/haya14busa/goplay/cmd/goplay FAILED
Installing github.com/josharian/impl FAILED
Installing github.com/rogpeppe/godef FAILED
Installing sourcegraph.com/sqs/goreturns FAILED
Installing golang.org/x/lint/golint FAILED
Installing github.com/cweill/gotests/... FAILED
Installing github.com/derekparker/delve/cmd/dlv FAILED

安装提示后,安装插件,很不幸,全部失败,网上找了很多教程,感觉很麻烦,找了好久找到最简单的一种方法。

用法,(Go 1.13 及以上)

打开你的终端并执行

$ go env -w GO111MODULE=on
$ go env -w GOPROXY=https://goproxy.cn,direct

完成。

macOS 或 Linux,打开你的终端并执行

$ export GO111MODULE=on
$ export GOPROXY=https://goproxy.cn

或者

$ echo "export GO111MODULE=on" >> ~/.profile
$ echo "export GOPROXY=https://goproxy.cn" >> ~/.profile
$ source ~/.profile

完成。

Windows,打开你的 PowerShell 并执行

C:\> $env:GO111MODULE = "on"
C:\> $env:GOPROXY = "https://goproxy.cn"

或者

1. 打开“开始”并搜索“env”
2. 选择“编辑系统环境变量”
3. 点击“环境变量…”按钮
4. 在“<你的用户名> 的用户变量”章节下(上半部分)
5. 点击“新建…”按钮
6. 选择“变量名”输入框并输入“GO111MODULE”
7. 选择“变量值”输入框并输入“on”
8. 点击“确定”按钮
9. 点击“新建…”按钮
10. 选择“变量名”输入框并输入“GOPROXY”
11. 选择“变量值”输入框并输入“https://goproxy.cn”
12. 点击“确定”按钮

完成。

vscode 安装go插件失败后,最简单的方法的更多相关文章

  1. vscode安装golang插件失败问题

    vscode安装golang插件失败问题 dlv go-outline go-symbols gocode-gomod gocode 代码补全 godef 代码跳转 golint gopkgs gor ...

  2. ubuntu下vscode安装go插件失败解决办法

    go env -w GO111MODULE=on go env -w GOPROXY=https://goproxy.io,direct go env -w GOSUMDB=gosum.io+ce6e ...

  3. MacOS VSCode 安装 GO 插件失败问题解决

    0x00 问题重现 Installing golang.org/x/tools/cmd/guru FAILED Installing golang.org/x/tools/cmd/gorename F ...

  4. vscode安装go插件失败

    解决办法:使用golang代理,在环境变量中添加两个新变量: 详情参考vscode中为golang开发环境配置代理goproxy 之后便有一部分可以安装成功

  5. vscode安装dlv插件报错:There is no tracking information for the current branch.

    vscode安装dlv插件报错:There is no tracking information for the current branch. https://blog.csdn.net/a7859 ...

  6. (转)eclipse安装ADT插件重启后不显示Android SDK Manager和Android Virtual Device Manager图标的一种解决办法

    文章来源:http://blog.csdn.net/zcyhappy1314/article/details/8307534 下面说的这种情况是在正确安装ADT插件的前提下,重启eclipse后,工具 ...

  7. win10中,vscode安装go插件排雷指南

    最近学习go,想着使用强大的vscode编写go,在安装go插件过程中,遇到了很多问题.下面记录解决方案. 1)win10环境,安装go,vscode,git 配置GOPATH环境变量,在我的电脑-& ...

  8. Installing github.com/mdempsky/gocode FAILED ----vscode安装go插件中的一些坑

    问题前景: 最近在使用vscode,编写一些go的代码,但发现调试的时候,会需要安装很多插件,但通过vscode之间安装的话,会出现如下的错误: Installing github.com/mdemp ...

  9. VSCode安装jshint插件报错

    Mac电脑上使用VSCode安装jshint插件时提示如下错误: Failed to load jshint library. Please install jshint in your worksp ...

随机推荐

  1. math库常用函数

  2. 添加entity实体时报错未能找到 EntityFramework.dll

    错误 1 正在编译转换: 未能找到元数据文件“C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Tools\..\IDE\Enti ...

  3. 用大白话的方式讲明白Java的StringBuilder、StringBuffer的扩容机制

    StringBuffer和StringBuilder,它们的底层char数组value默认的初始化容量是16,扩容只需要修改底层的char数组,两者的扩容最终都会调用到AbstractStringBu ...

  4. idea修改module name后重启失效

    技术交流群 : 816227112 idea每次修改module name后重启,module还是会在后面加上原来的name. 这时修改: .idea下的modules.xml 内的module名即可 ...

  5. scala下划线的用法

    1.作为“通配符”,类似Java中的*.如import scala.math._2.:_*作为一个整体,告诉编译器你希望将某个参数当作参数序列处理!例如val s = sum(1 to 5:_*)就是 ...

  6. Qt实现的多菜单选择界面

    文章目录 1.效果展示 2.实现代码 2.1 菜单实现代码 2.1.1 头文件 2.1.2 源文件 2.2 应用代码 1.效果展示 这种菜单样式比较常用,实现的方法也有很多种,比如可以直接使用QTab ...

  7. javascript 字符串对象

    数组转换字符串     tostring() 将数组转换成字符串     join(分隔符)将数组转换成字符串     基本包装类型     基本包装类型 就是把简单数据类型 包装成繁杂数据类型    ...

  8. Azure Application Gateway(二)对后端 VM 进行负载均衡

    一,引言 上一节有讲到使用 Azure Application Gateway 为我们后端类型为 Web App 的 Demo 项目提供负载均衡,Azure Application Gateway 的 ...

  9. xshell乱码解决办法

    https://jingyan.baidu.com/article/7908e85c758a58af481ad2ae.html

  10. Spring Cloud Config Client 超时与重试

    简介 有时客户端需要在 config server 无响应时进行重试,以给 config server 时间进行恢复.利用 spring 提供的重试组件,我们可以方便的配置重试机制,包括重试间隔,重试 ...