当前位置:网站首页>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 # 校验依赖

边栏推荐
- 【Vue.js 3.0源码】KeepAlive 组件:如何让组件在内存中缓存和调度?
- 面试何惧调优!腾讯技术官私藏的性能优化方案手册,原理实战齐全
- About the data synchronization delay of MySQL master-slave replication
- MySql报错:SqlError(Unable to execute query“, “Can‘t create/write to file OS errno 2 - No such file...
- Container sorting case
- Remember an experience of interviewing an outsourcing company, should you go?
- EasyV数字孪生流域|宁波智慧水利整体智治综合应用
- canal scrape data
- 闭包和装饰器
- Allure进阶-动态生成报告内容
猜你喜欢

Metaverse Post Office AI space-themed series of digital collections will be launched at 10:00 on July 30th "Yuanyou Digital Collection"

惊艳!京东T8纯手码的Redis核心原理手册,基础与源码齐下

存储器映射、位带操作

The evolution of content products has three axes: traffic, technology, and product form

Interface automation framework, lm-easytest beta version released, use it quickly~

Web3创始人和建设者必备指南:如何构建适合的社区?

机房布线的至高境界,美到窒息

MongoDB启动报错 Process: 29784 ExecStart=/usr/bin/mongod $OPTIONS (code=exited, status=14)

canal scrape data

如何写一份高可读性的软件工程设计文档
随机推荐
Container sorting case
闭包和装饰器
PyQt5快速开发与实战 9.1 使用PyInstaller打包项目生成exe文件
基于5G的仓储信息化解决方案2022
EasyV数字孪生流域|宁波智慧水利整体智治综合应用
Huawei's 7-year-experienced software testing director, gives some advice to all friends who want to change careers to learn software testing
第十一章 api mgmnt API 参考
新时代背景下智慧城市的建设与5G技术有何关联
内容产品进化三板斧:流量、技术、产品形态
localhost与127.0.0.1
Redis 缓存穿透、击穿、雪崩以及一致性问题
DocuWare 文件管理与工作流程自动化案例研究——DocuWare 工作流程功能使在家工作的员工能够保持沟通和高效工作,支持混合环境
Before quitting, make yourself a roll king
Flink optimization
嵌入式开发:嵌入式基础知识——正确启动固件项目的 10 条建议
元宇宙邮局AI航天主题系列数字藏品 将于7月30日10:00点上线“元邮数藏”
面试何惧调优!腾讯技术官私藏的性能优化方案手册,原理实战齐全
What is Ts?
Recommended open source tools: MegPeak, a high-performance computing tool
MySql报错:SqlError(Unable to execute query“, “Can‘t create/write to file OS errno 2 - No such file...
