当前位置:网站首页>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 :
边栏推荐
- [pulsar learning] pulsar Architecture Principle
- Curriculum learning (CL)
- MySQL单表500万条数据增、删、改、查速度测试
- online trajectory generation
- 2021-11-12 vrep vision sensor configuration
- LeetCode 498. 对角线遍历
- [trajectory planning] testing of ruckig Library
- The first techo day Tencent technology open day, 628
- CVPR:Refining Pseudo Labels with Clustering Consensus over Generations for Unsupervised Object Re-ID
- How to solve the problem that NVIDIA model cannot be viewed by inputting NVIDIA SMI and quickly view NVIDIA model information of computer graphics card
猜你喜欢

Upgrade idea to 2021.2 shortcut keys

Badge series 8: generate a personalized Badge

工企专利匹配数据(数十万数据量)1998-2014年

Badge series 7: use of codacy

Single sign on logic

c语言语法基础之——指针( 多维数组、函数、总结 ) 学习

2021-11-22 运动规划杂记

"One week's work on Analog Electronics" - power amplifier

Install new version cmake & swig & tinyspline

2021-11-29 轨迹规划五次多项式
随机推荐
Notes on sports planning on November 22, 2021
2021-11-22 运动规划杂记
Several connection query methods of SQL (internal connection, external connection, full connection and joint query)
jz2440---使用uboot燒錄程序
【Sensors 2021】Relation-Based Deep Attention Network with Hybrid Memory for One-Shot Person Re-Id
Joint Noise-Tolerant Learning and Meta Camera Shift Adaptation for Unsupervised Person Re-ID
Detailed explanation of the network security competition questions (2) of the 2021 national vocational college skills competition (secondary vocational group)
Spark based distributed parallel processing optimization strategy - Merrill Lynch data
pcl install
Board end power hardware debugging bug
Use recursion or a while loop to get the name of the parent / child hierarchy
Thinkphp5 using the composer installation plug-in prompts that the PHP version is too high
LeetCode 498. Diagonal traversal
深度学习(初识tensorflow2.版本)之三好学生成绩问题(1)
The most complete and simple nanny tutorial: deep learning environment configuration anaconda+pychart+cuda+cudnn+tensorflow+pytorch
Enter the page input box to automatically obtain the focus
What you need to know to test -- URL, weak network, interface, automation
【Open5GS】Open5GS安装配置
Redis 新手入门
Summary of common commands of vim