当前位置:网站首页>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 :
边栏推荐
- PHP does not allow images to be uploaded together with data (no longer uploading images before uploading data)
- Several connection query methods of SQL (internal connection, external connection, full connection and joint query)
- Learning to Generalize Unseen Domains via Memory-based Multi-Source Meta-Learning for Person Re-ID
- pcl install
- 教你用shell脚本检测服务器程序是否在运行
- 【CVPR 2021】Unsupervised Pre-training for Person Re-identification(UPT)
- jz2440---使用uboot烧录程序
- Badge series 5: use of codecov
- How does flutter transfer parameters to the next page when switching pages?
- VI summary of common commands
猜你喜欢

【CVPR 2021】 Lifelong Person Re-Identification via Adaptive Knowledge Accumulation

Regular expression learning

Badge series 8: generate a personalized Badge

Logview Pro can be used if the log is too large

Spark based distributed parallel processing optimization strategy - Merrill Lynch data

深度学习(初识tensorflow2.版本)之三好学生成绩问题(1)

Notes on sports planning on November 22, 2021

全面解读!Golang中泛型的使用

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

Upgrade idea to 2021.2 shortcut keys
随机推荐
Shared by Merrill Lynch data technology expert team, smoking detection related practice based on Jetson nano
logback
c语言语法基础之——指针(字符、一维数组) 学习
LeetCode 958. Completeness checking of binary tree
Catalogue gradué de revues scientifiques et technologiques de haute qualité dans le domaine de l'informatique
[pulsar learning] pulsar Architecture Principle
Introduction to QPM
Badge series 7: use of codacy
Leetcode refers to offer II 091 Paint house - modify in place
Regular expression learning
Thinkphp5 manual error reporting
Collection object replication
The third-party extension package of thinkphp6.0 supports uploading to Alibaba cloud and qiniu cloud
The first techo day Tencent technology open day, 628
【Sensors 2021】Relation-Based Deep Attention Network with Hybrid Memory for One-Shot Person 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
【CVPR 2021】Unsupervised Multi-Source Domain Adaptation for Person Re-Identification (UMSDA)
LeetCode 0710.黑名单中的随机数 - 预处理实现O(1)取值
SQL modification of table structure
2021年全国职业院校技能大赛(中职组)网络安全竞赛试题(2)详解