Skip to content

Commit ced0fdb

Browse files
author
Jay Conrod
committed
doc/go1.17: note deprecation of 'go get' for installing commands
Fixes #43684 Change-Id: I8982f6816c002c71e62f37a926c8543e34b8b785 Reviewed-on: https://go-review.googlesource.com/c/go/+/329549 Trust: Jay Conrod <[email protected]> Reviewed-by: Bryan C. Mills <[email protected]>
1 parent 7a5e704 commit ced0fdb

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

doc/go1.17.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,16 @@ <h4 id="go-get"><code>go</code> <code>get</code></h4>
214214
<code>environment</code> for details.
215215
</p>
216216

217+
<p><!-- golang.org/issue/43684 -->
218+
<code>go</code> <code>get</code> prints a deprecation warning when installing
219+
commands outside the main module (without the <code>-d</code> flag).
220+
<code>go</code> <code>install</code> <code>cmd@version</code> should be used
221+
instead to install a command at a specific version, using a suffix like
222+
<code>@latest</code> or <code>@v1.2.3</code>. In Go 1.18, the <code>-d</code>
223+
flag will always be enabled, and <code>go</code> <code>get</code> will only
224+
be used to change dependencies in <code>go.mod</code>.
225+
</p>
226+
217227
<h4 id="missing-go-directive"><code>go.mod</code> files missing <code>go</code> directives</h4>
218228

219229
<p><!-- golang.org/issue/44976 -->

0 commit comments

Comments
 (0)