当前位置:网站首页>golang modules初始化项目
golang modules初始化项目
2022-07-30 14:39:00 【JavaPub-rodert】
博主介绍: 自媒体 JavaPub 独立维护人,全网粉丝15w+,csdn博客专家、java领域优质创作者,51ctoTOP10博主,知乎/掘金/华为云/阿里云/InfoQ等平台优质作者、专注于Java、
GoLang技术领域和副业。
前言
环境:golang 1.18.3

设置代码
GOPROXY="https://goproxy.io,direct"
go modules 常用命令
go mod init # 初始化go.mod
go mod tidy # 更新依赖文件
go mod download # 下载依赖文件
go mod vendor # 执行此命令,会将刚才下载至 GOPATH 下的依赖复制至该项目根目录下的 vendor(自动新建) 文件夹下
go mod edit # 手动修改依赖文件
go mod graph # 打印依赖图
go mod verify # 校验依赖

边栏推荐
- 关于String的一些思考
- 组态 - 笔记
- MongoDB starts an error Process: 29784 ExecStart=/usr/bin/mongod $OPTIONS (code=exited, status=14)
- 我们公司用了 6 年的网关服务,动态路由、鉴权、限流等都有,稳的一批!
- MASM32v11编程调用Process32First失败: 程序发出命令,但命令长度不正确
- 新时代背景下智慧城市的建设与5G技术有何关联
- Lock wait timeout exceeded solution
- 5. DOM
- 华为再发「天才少年」召集令!曾放弃360万年薪的他也来首秀
- Recommended open source tools: MegPeak, a high-performance computing tool
猜你喜欢
随机推荐
Go to Tencent for an interview and let people turn left directly: I don't know idempotency!
MongoDB starts an error Process: 29784 ExecStart=/usr/bin/mongod $OPTIONS (code=exited, status=14)
Distributed pre-course: MySQL implements distributed locks
超T动力 盈运天下——中国重汽黄河/豪沃WP14T产品首发荣耀上市!
MySQL客户端工具的使用与MySQL SQL语句
Smart Contract Security - Private Data Access
新时代背景下智慧城市的建设与5G技术有何关联
怎么判断两个字符串是否相等?
浅析显卡市场的未来走向:现在可以抄底了吗?
The main content of terrain analysis (the special effect level of the wandering earth)
Hello, World
MongoDB starts an error Process: 29784 ExecStart=/usr/bin/mongod $OPTIONS (code=exited, status=14)
What is the relationship between the construction of smart cities and 5G technology in the new era
Redis 缓存穿透、击穿、雪崩以及一致性问题
SQL 优化这么做就对了!
[深入研究4G/5G/6G专题-46]: 5G Link Adaption链路自适应-2-常见缩略语
This editor actually claims to be as fast as lightning!
canal scrape data
面试何惧调优!腾讯技术官私藏的性能优化方案手册,原理实战齐全
第十一章 api mgmnt API 参考









