-
Notifications
You must be signed in to change notification settings - Fork 17.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd/go: implement 'go install pkg@version'
With this change, 'go install' will install executables in module mode without using or modifying the module in the current directory, if there is one. For #40276 Change-Id: I922e71719b3a4e0c779ce7a30429355fc29930bf Reviewed-on: https://go-review.googlesource.com/c/go/+/254365 Run-TryBot: Jay Conrod <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Bryan C. Mills <[email protected]> Reviewed-by: Michael Matloob <[email protected]>
- Loading branch information
Jay Conrod
committed
Sep 15, 2020
1 parent
ea33523
commit e306363
Showing
11 changed files
with
605 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,6 +43,18 @@ <h2 id="tools">Tools</h2> | |
|
||
<h3 id="go-command">Go command</h3> | ||
|
||
<p><!-- golang.org/issue/40276 --> | ||
<code>go</code> <code>install</code> now accepts arguments with | ||
version suffixes (for example, <code>go</code> <code>install</code> | ||
<code>example.com/[email protected]</code>). This causes <code>go</code> | ||
<code>install</code> to build and install packages in module-aware mode, | ||
ignoring the <code>go.mod</code> file in the current directory or any parent | ||
directory, if there is one. This is useful for installing executables without | ||
affecting the dependencies of the main module.<br> | ||
TODO: write and link to section in golang.org/ref/mod<br> | ||
TODO: write and link to blog post | ||
</p> | ||
|
||
<p><!-- golang.org/issue/24031 --> | ||
<code>retract</code> directives may now be used in a <code>go.mod</code> file | ||
to indicate that certain published versions of the module should not be used | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.