当前位置:网站首页>02.Go语言开发环境配置
02.Go语言开发环境配置
2022-07-06 01:30:00 【[email protected]】
目录
1. Go 安装
1.1 Linux平台安装Go
1.1.1 使用 Linux,可以用如下方式快速安装。
$ wget https://golang.google.cn/dl/go1.18.3.linux-amd64.tar.gz
$ tar -xzvf go1.18.3.linux-amd64.tar.gz
$ mv go /usr/local/#####################################################
1.1.2 设置环境变量
# 安装目录
export GOROOT=/usr/local/go
# 代码目录
export GOPATH=~/code export
PATH=$PATH:$GOPATH:$GOROOT/bin1.1.3 检查是否安装成功
输入 go version 查看go的版本号
如果出现go的版本号,则说明go安装成功
[[email protected] lianxi]# go version
go version go1.18.3 linux/amd64
[[email protected] lianxi]#
#####################################################
1.2 windows安装go
1.2.1 下载
下载路径:https://golang.google.cn/dl/go1.18.3.windows-amd64.msi
下载完成后直接安装 .msi文件就行

#####################################################
1.2.2 将安装路径添加到环境变量
示例:我将go安装在了 : E:\go
进入环境变量的配置

用户变量和环境变量都可以,(反正是自己用的机器)
新建GOROOT变量,变量值为go安装路径

新建GOPATH变量,这个变量用来存放go代码的目录的路径(go_code是自己新建的)

然后在系统变量的path变量里面添加这两条

#####################################################
1.2.3 检查go在windows是否安装成功
能成功显示版本号即安装成功

版权声明
本文为[[email protected]]所创,转载请带上原文链接,感谢
https://blog.csdn.net/qq_48391148/article/details/125571213
边栏推荐
- Alibaba-Canal使用详解(排坑版)_MySQL与ES数据同步
- Docker compose配置MySQL并实现远程连接
- PHP error what is an error?
- [understanding of opportunity-39]: Guiguzi - Chapter 5 flying clamp - warning 2: there are six types of praise. Be careful to enjoy praise as fish enjoy bait.
- JMeter BeanShell的基本用法 一下语法只能在beanshell中使用
- 记一个 @nestjs/typeorm^8.1.4 版本不能获取.env选项问题
- dried food! Accelerating sparse neural network through hardware and software co design
- Unity VR solves the problem that the handle ray keeps flashing after touching the button of the UI
- Opinions on softmax function
- MCU lightweight system core
猜你喜欢

Force buckle 9 palindromes

基於DVWA的文件上傳漏洞測試

Docker compose配置MySQL并实现远程连接

leetcode刷题_反转字符串中的元音字母

Leetcode skimming questions_ Sum of squares
![[flask] official tutorial -part3: blog blueprint, project installability](/img/fd/fc922b41316338943067469db958e2.png)
[flask] official tutorial -part3: blog blueprint, project installability

现货白银的一般操作方法

c#网页打开winform exe

普通人下场全球贸易,新一轮结构性机会浮出水面

Yii console method call, Yii console scheduled task
随机推荐
Opinions on softmax function
leetcode刷题_反转字符串中的元音字母
Redis-列表
Paddle框架:PaddleNLP概述【飞桨自然语言处理开发库】
ORA-00030
[Jiudu OJ 09] two points to find student information
安装Redis
Win10 add file extension
现货白银的一般操作方法
Loop structure of program (for loop)
The basic usage of JMeter BeanShell. The following syntax can only be used in BeanShell
【Flask】静态文件与模板渲染
[flask] official tutorial -part1: project layout, application settings, definition and database access
Huawei Hrbrid interface and VLAN division based on IP
leetcode刷题_验证回文字符串 Ⅱ
伦敦银走势中的假突破
【已解决】如何生成漂亮的静态文档说明页
How to see the K-line chart of gold price trend?
Basic operations of databases and tables ----- default constraints
Threedposetracker project resolution