windows安装

下载安装

Go官网下载地址:https://golang.org/dl/

由于网络问题大家可能打开有些慢,或者下载失败。大家也可以从下边下载。
下载执行后大家直接一路下一步就行了。

配置环境变量

(win+pause打开设置)–> 高级设置 --> 高级 --> 环境变量

配置GOPATH;他是用来存放你项目工程代码的地方。
然后将GOPATH 和 go安装的路劲配置到path中。

然后通过cmd执行go version查看版本,当看到版本后证明安装成功。

创建工程目录

在我们GOPATH中创建 bin pkg src

开发工具

go语言的开发工具有很多,这个根据个人的喜好进行选择。vscode、goland 、IntelliJ + Go 插件、LiteIDE等都行。他就是一个工具不用太纠结。

vscode+go插件

mac和window安装一样的。去官网下载https://code.visualstudio.com/download
在vscode中搜索go,然后安装。为了方便使用你可以先安装一个中文插件。

安装成功后在安装go语言开发工具安装包(代码提示,代码自动补全等功能)。
shift+ctrl+p 然后输入go:install选择Go:Install/Update Tools

全选,然后安装。

安装问题解决

如果安装过程中显示如下无法安装。

Tools environment: GOPATH=C:\workspace\goproject
Installing 10 tools at C:\workspace\goproject\bin in module mode.gopkgsgo-outlinegotestsgomodifytagsimplgoplaydlvdlv-dapstaticcheckgoplsInstalling github.com/uudashr/gopkgs/v2/cmd/gopkgs@latest FAILED
{"killed": false,"code": 1,"signal": null,"cmd": "C:\\Program Files\\Go\\bin\\go.exe install -v github.com/uudashr/gopkgs/v2/cmd/gopkgs@latest","stdout": "","stderr": "go install: github.com/uudashr/gopkgs/v2/cmd/gopkgs@latest: module github.com/uudashr/gopkgs/v2/cmd/gopkgs: Get \"https://proxy.golang.org/github.com/uudashr/gopkgs/v2/cmd/gopkgs/@v/list\": dial tcp 172.217.27.145: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.\n"
}
Installing github.com/ramya-rao-a/go-outline@latest FAILED
{"killed": false,"code": 1,"signal": null,"cmd": "C:\\Program Files\\Go\\bin\\go.exe install -v github.com/ramya-rao-a/go-outline@latest","stdout": "","stderr": "go install: github.com/ramya-rao-a/go-outline@latest: module github.com/ramya-rao-a/go-outline: Get \"https://proxy.golang.org/github.com/ramya-rao-a/go-outline/@v/list\": dial tcp 172.217.27.145: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.\n"
}
Installing github.com/cweill/gotests/gotests@latest FAILED
{"killed": false,"code": 1,"signal": null,"cmd": "C:\\Program Files\\Go\\bin\\go.exe install -v github.com/cweill/gotests/gotests@latest","stdout": "","stderr": "go install: github.com/cweill/gotests/gotests@latest: module github.com/cweill/gotests/gotests: Get \"https://proxy.golang.org/github.com/cweill/gotests/gotests/@v/list\": dial tcp 172.217.27.145: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.\n"
}
Installing github.com/fatih/gomodifytags@latest FAILED
{"killed": false,"code": 1,"signal": null,"cmd": "C:\\Program Files\\Go\\bin\\go.exe install -v github.com/fatih/gomodifytags@latest","stdout": "","stderr": "go install: github.com/fatih/gomodifytags@latest: module github.com/fatih/gomodifytags: Get \"https://proxy.golang.org/github.com/fatih/gomodifytags/@v/list\": dial tcp 172.217.27.145: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.\n"
}
Installing github.com/josharian/impl@latest FAILED
{"killed": false,"code": 1,"signal": null,"cmd": "C:\\Program Files\\Go\\bin\\go.exe install -v github.com/josharian/impl@latest","stdout": "","stderr": "go install: github.com/josharian/impl@latest: module github.com/josharian/impl: Get \"https://proxy.golang.org/github.com/josharian/impl/@v/list\": dial tcp 142.251.42.241: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.\n"
}

原因是网络问题。懂得都懂。我们只需配置一下国内的代理重新下载安装一下插件就好了。

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

go环境搭建开发工具安装配置相关推荐

  1. Python3 环境搭建、pycharm安装配置详解、新建Python项目(新手小白版Windows系统)

    Python3 环境搭建 .pycharm安装配置详解 window系统上环境搭建: 一.环境搭建,下载Python (Python 3.8为例) 二.pycharm的下载与安装 window系统上环 ...

  2. 【开发工具】Windows环境下 IDEA 开发工具安装配置(无错完整)

    目录 一.开发工具下载: 二.IDE统一管理工具: 三.IDEA配置: 设置主题: 设置代码颜色: 设置编译字符编码(全部设置为UTF-8): 开启模糊匹配: 设置背景壁纸: 自动导包移包: 方法分割 ...

  3. nodejs环境搭建与express安装配置

    一.NPM 1.下载nodeJS 下载地址:https://nodejs.org/en/download/ 因为我的系统是Linux 的,所以下载已经编译好的Linux,nodejs tar包 3.下 ...

  4. HTML1.0 - html 环境搭建 开发工具

    1. mac  电脑 2. Hbuilder 开发软件 3. 学习基础 HTML 语法 网站  http://www.w3school.com.cn 转载于:https://www.cnblogs.c ...

  5. VUE前段开发-开发环境搭建和开发工具安装

    一 VUE介绍 (1)VUE,也就是vue.js,官方的介绍是是一套用于构建用户界面的渐进式框架.与其它大型框架不同的是,Vue 被设计为可以自底向上逐层应用.Vue 的核心库只关注视图层,不仅易于上 ...

  6. 传智播客C/C++各种开发环境搭建视频工具文档免费教程

    传智播客作为中国IT培训的领军品牌,一直把握技术趋势,给大家带来最新的技术分享!传智播客C/C++主流开发环境免费分享视频文档中,就有写一个helloworld程序的示范.火速前来下载吧 所谓&quo ...

  7. 【鸿蒙 HarmonyOS】HarmonyOS 开发环境搭建 ( Node.js 安装 )

    文章目录 一.下载 Node.js® 安装包 二.安装 Node.js 三.验证 Node.js 鸿蒙 HarmonyOS 开发环境 DevEco Studio 安装 , 参考博客 : [鸿蒙 Har ...

  8. vuejs项目开发环境搭建(ESlint安装)

    vuejs项目开发环境搭建(ESlint安装) vuejs项目开发环境搭建,有时候需要安装ESlint! eslint对ES6语法支持更好,可以通过eslint在团队开发中快速统一ES6的语法,精简代 ...

  9. 前端开发环境搭建(工具使用)

    迅雷 用于之后下载一些安装包,速度较快 命令行工具 shift + 鼠标右键:在此处打开powershell node + 文件名: 在node中执行文件 输入部分文件名 + Tab: 自动补全文件名 ...

最新文章

  1. java管程 实现,Java中的管程模型
  2. tomcat 7/8 启动非常慢的解决方法
  3. 《R语言实战》第7章
  4. m3u8解析_浅谈m3u8格式视频文件采集
  5. 居家养老管理系统设计
  6. java基础案例教程第二版pdf,Java系列学习进阶视频
  7. 网页打开html无法编辑,电脑浏览器网页无法输入文字该怎么办?
  8. lisp 标注螺纹孔_尺寸标注之螺纹标注的正确方式
  9. 21世纪十大营销法则
  10. 学计算机应该买多大尺寸笔记本电脑,笔记本电脑买几寸的比较合适?
  11. mysql 添加 删除索引(index) alter table 修改字段 修改列
  12. java swing GUI窗口美化
  13. laravel路由设置
  14. 全差分运放中CMFB方面的学习
  15. Protobuf 了解
  16. 03 | 词法分析程序与有穷自动机
  17. HTML类似美团关联列表 左右联动列表
  18. 数据集的划分,验证集参与训练了吗?
  19. java Queue中 add/offer,element/peek,remove/poll区别
  20. 有源低通滤波器 vs. 有源带通滤波器 vs. LC滤波器

热门文章

  1. STM32F7上移植NES游戏
  2. 计算机通电后 不能正常启动,我的电脑通电后不能马上启动?为什么啊?怎么办
  3. 全国计算机等级考试二级公共,全国计算机等级考试二级公共基础知识.
  4. JS如何判断是否为ie浏览器的方法(包括IE10、IE11在内)
  5. [Pandas技巧] 多列值合并成一列
  6. MySQL数据库基础——强大的select之二,更加精彩的功能
  7. win10驱动开发19——IRP同步
  8. socket常用参数解释
  9. 前端上传文件保存到变量中
  10. 湖北二本大学计算机排名,2017年二本大学排名及分数线(湖北省)