当前位置:网站首页>go环境安装
go环境安装
2022-07-15 19:03:00 【李海成】
提示:文章写完后,目录可以自动生成,如何生成可参考右边的帮助文档
前言
go的安装比较容易,下载安装帖子很多,这里记点过程中的要点
一、环境变量
goRoot:go安装包路径
goPath:go项目路径
其下应当创建三个目录
src:三方库的下载路径
pkg-mod 三方库也可能下载到这
bin:三方库的可执行文件
goProxy:go代理
注意:要配合GO111MODULE使用,可以解决go get时,遇到unrecognized import path的问题
解决go get时,遇到unrecognized import path的问题
二、下载安装三方库
go get github.com/beego/bee
下载到pkg-mod
go install github.com/beego/[email protected]
安装到bin
三、mod
前文方法不靠谱,大佬给讲了一下mod管理方法
1.建立项目文件夹
2.idea打开
3.初始化mod
go mod init demo #普通项目
go mod init github.com/xxx/demo # github项目
4.导入三方依赖
go mod tidy
总结
一知半解。。。gopath和go项目目录什么关系??
边栏推荐
- [Halcon] WriteImage保存图像崩溃问题
- [Unity]技巧分享:更改Unity Asset Store 默认下载资源位置的方法
- MySQL about the installation process of zip installation package
- (2021 Niuke multi school V) k-king of range (monotonous queue /st table)
- 去除列表中重复元素 max min key
- How to add a tracked remote branch when using a single branch clone repository?
- [small 5 chat] simple use of built-in and custom delegation of C # Foundation
- Modify WiFi for Xiaomi camera
- 【LeetCode】10. Maximum Subarray·最大子数组和
- Edusoho enterprise training version does not connect to the cloud and starts double speed playback
猜你喜欢

Pgbadger offline log analysis tool

(手工)【sqli-labs40、41】堆叠注入、盲注

无需训练代码,推理性能提升1.4~7.1倍,业界首个自动模型压缩工具开源
![[leetcode weekly -- hash table simulation] 6113 The smallest number in an infinite set](/img/4f/817ca6ff4265ab2fafe71210e22a4e.png)
[leetcode weekly -- hash table simulation] 6113 The smallest number in an infinite set

6 个超级良心的开源教程!

国内外知名的待办事项app

健康防猝指南1:体重和减肥的秘密

(2021 Niuke multi school V) d-double strings (multiplication principle + dynamic programming)

论软件自动化测试中 QR_Code 的登录的逻辑

ROS (25): release a static odometer Odom information
随机推荐
Force deduction solution summary 558- intersection of quadtrees
[in depth study of 4g/5g/6g topic -36]: urllc-7 - in depth interpretation of 3GPP urllc related protocols, specifications and technical principles -1- business scenarios, evolution routes and performa
base64和blob对图片的压缩
Win10开启沙盒功能和使用
Grails 引发的中文乱码问题
MySQL about the installation process of zip installation package
Set round avatar -- canvas and paint
蓝帽杯2022初赛电子取证
ros(25):发布一个静态的里程计odom信息
(codeforce631)C.Report(单调栈)
6 个超级良心的开源教程!
Realize effective robot education and training management mode
iNFTnews | NFT门票将改变参与活动的方式
V-model and Differences between sync modifiers
去除列表中重复元素 max min key
GET 请求和 POST 请求的区别与使用示例
Chinese garbled code caused by Grails
华泰证券网上开户安全吗,需要什么材料
(codeforce319)B.Psychos in a Line(单调栈)
鸿湖万联致远开发板正式合入OpenHarmony主干