当前位置:网站首页>This new change of go 1.16 needs to be adapted: the changes of go get and go install
This new change of go 1.16 needs to be adapted: the changes of go get and go install
2022-06-26 09:46:00 【wohu1104】
Original address :
Go 1.16 This new change needs to be adapted :go get and go install The change of
all the time ,go get For downloading and installing Go package 、 Orders, etc , and go install stay module It is rarely used in the times , stay GOPATH years ,go install Used to compile and install local projects .
since 1.16 rise , The official said , Should not be go get Download the installation command ( You can execute the program ), But it's just that , But it can still be used .
but Go1.17 Start , If you use go get Installation command , Warning :
$ go get github.com/github/hub
go get: installing executables with 'go get' in module mode is deprecated.
To adjust and download dependencies of the current module, use 'go get -d'.
To install using requirements of the current module, use 'go install'.
To install ignoring the current module, use 'go install' with a version,
like 'go install example.com/[email protected]'.
For more information, see https://golang.org/doc/go-get-install-deprecation
or run 'go help get' or 'go help install'.
in other words ,go get Only for downloading ordinary packages , Install executable , You should use go install.
$ go install github.com/github/hub
This will hub Command to install to $GOBIN Next .
Besides ,go get There is a parameter -d, instructions go get Download the corresponding package , But do not compile and install . Future versions ,-d Will become the default behavior , It will be faster . Besides , Because it doesn't compile , Even if the target relies on compiling an error on a specific platform ,go get It can also be executed normally .
About Go 1.16 The change of .Reddit There is a picture on the drawing that summarizes very well :
边栏推荐
- SQL高级教程
- Kubernetes cluster deployment (v1.23.5)
- 进入页面输入框自动获取焦点
- 做测试需要知道的内容——url、弱网、接口、自动化、
- Jz2440 - - - utiliser le programme de gravure uboot
- c语言语法基础之——指针(字符、一维数组) 学习
- How to correctly open the USB debugging and complete log functions of Huawei mobile phones?
- "One week to finish the model electricity" - 55 timer
- SQL modification of table structure
- Comparison of similar PMS in QPM
猜你喜欢

VI summary of common commands

Kubernetes cluster deployment (v1.23.5)

Detailed explanation of the network security competition questions (2) of the 2021 national vocational college skills competition (secondary vocational group)

How to view the data mini map quickly and conveniently after importing data in origin

【CVPR 2021】Joint Generative and Contrastive Learning for Unsupervised Person Re-identification

Thinkphp5 manual error reporting

做测试需要知道的内容——url、弱网、接口、自动化、

Explained: A Style-Based Generator Architecture for GANs (StyleGAN)

jz2440---使用uboot烧录程序

Spark based distributed parallel processing optimization strategy - Merrill Lynch data
随机推荐
Badge series 8: generate a personalized Badge
Throttling, anti chattering, new function, coriolism
PHP does not allow images to be uploaded together with data (no longer uploading images before uploading data)
欧冠比赛数据集(梅西不哭-离开巴萨也可能再创巅峰)
2021-11-12 vrep vision sensor configuration
Shared by Merrill Lynch data technology expert team, smoking detection related practice based on Jetson nano
There is a strong demand for enterprise level data integration services. How to find a breakthrough for optimization?
爬虫相关文章收藏:pyppeteer 、Burpsuite
我的创作纪念日
js---获取对象数组中key值相同的数据,得到一个新的数组
2021-11-29 轨迹规划五次多项式
SQL高级教程
Thinking before QPM preparation optimization
MapReduce & yarn theory
kubernetes集群部署(v1.23.5)
Board end power hardware debugging bug
点击遮罩层关闭弹窗
【Sensors 2021】Relation-Based Deep Attention Network with Hybrid Memory for One-Shot Person Re-Id
install ompl. sh
Leetcode refers to offer II 091 Paint house - modify in place