zoukankan      html  css  js  c++  java
  • 【Go】解决VS Code安装Go插件失败问题

    环境说明

    Win10

    Go 1.17.3

    VS Code 1.62.2

    问题现象

    使用vscode开发go程序时,提示未安装go插件,点击Install ALL

    会报一堆安装失败

    go-outline:
    
    Error: Command failed: D:\Go\bin\go.exe get -u -v github.com/ramya-rao-a/go-outline
    
    github.com/ramya-rao-a/go-outline (download)
    
    Fetching https://golang.org/x/tools/go/buildutil?go-get=1
    
    https fetch failed: Get https://golang.org/x/tools/go/buildutil?go-get=1: dial tcp 216.239.37.1:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
    

     解决办法

    使用https://goproxy.io代理

    在CMD窗口中设置Go环境变量

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

     关闭,重新打开vscode,点击Install All即可完成安装

    原创作者:郑立赛


    邮箱:zhenglisai@qq.com


    欢迎关注我们的公众号获取最新文章:运维自动化开发


    公众号
    公众号
  • 相关阅读:
    c# 定义委托和使用委托(事件的使用)
    c# 继承与多种状态
    ref 参数与out参数
    c# 类
    foreach 语句
    c# 制作弹窗
    c#常用类
    Python中的OS对路径的操作以及应用
    Git 推送文件到远程仓库
    Python基础 函数
  • 原文地址:https://www.cnblogs.com/zhenglisai/p/15567019.html
Copyright © 2011-2022 走看看