当前位置:网站首页>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 :
边栏推荐
- Notes on sports planning on November 22, 2021
- kubernetes集群部署(v1.23.5)
- Collection object replication
- pcl install
- Badge series 8: generate a personalized Badge
- SQL 函数
- What you need to know to test -- URL, weak network, interface, automation
- SQL function
- install opencv-contrib-dev to use aruco code
- LeetCode 498. Diagonal traversal
猜你喜欢
QPM performance monitoring components - General

力扣------从数组中移除最大值和最小值

Badge series 5: use of codecov

2021-11-22 运动规划杂记

Creation and use of XSync synchronization script (taking debian10 cluster as an example)

"One week to finish the model electricity" - 55 timer
![[Journal of Computer Aided Design & computer graphics] overview of research on pedestrian re recognition methods based on generated countermeasure network](/img/a9/1361df052f0474e5c50b948a92c42a.jpg)
[Journal of Computer Aided Design & computer graphics] overview of research on pedestrian re recognition methods based on generated countermeasure network

2021年全国职业院校技能大赛(中职组)网络安全竞赛试题(1)详细解析教程

jz2440---使用uboot烧录程序

【CVPR 2021】Unsupervised Multi-Source Domain Adaptation for Person Re-Identification (UMSDA)
随机推荐
Halcon photometric stereoscopic
Js--- get the data with the same key value in the object array to get a new array
jz2440---使用uboot烧录程序
Getting started with Flink - word statistics
Speed test of adding, deleting, modifying and querying 5million pieces of data in a single MySQL table
【CVPR 2021】Unsupervised Pre-training for Person Re-identification(UPT)
【Open5GS】Open5GS安装配置
計算領域高質量科技期刊分級目錄
"One week's work on Analog Electronics" - power amplifier
Use recursion or a while loop to get the name of the parent / child hierarchy
Mysql database field query case sensitive setting
c语言语法基础之——局部变量及存储类别、全局变量及存储类别、宏定义 学习
英语常用短语
How about the security of flush stock trading software? How to open an account in flush
SQL advanced tutorial
Enter the page input box to automatically obtain the focus
Several connection query methods of SQL (internal connection, external connection, full connection and joint query)
【Sensors 2021】Relation-Based Deep Attention Network with Hybrid Memory for One-Shot Person Re-Id
LeetCode 接雨水系列 42.(一维) 407.(二维)
online trajectory generation