]> Cypherpunks repositories - gostls13.git/commitdiff
doc/go1.17: document go run pkg@version
authorMichael Matloob <matloob@golang.org>
Thu, 10 Jun 2021 21:02:44 +0000 (17:02 -0400)
committerMichael Matloob <matloob@golang.org>
Tue, 15 Jun 2021 17:05:31 +0000 (17:05 +0000)
Fixes #46687

Change-Id: I6c311f15d3871a9824306b901fa0b81818ed2df8
Reviewed-on: https://go-review.googlesource.com/c/go/+/326870
Trust: Michael Matloob <matloob@golang.org>
Run-TryBot: Michael Matloob <matloob@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
doc/go1.17.html

index 642bd6014947601bfae174a5a2bb6ceecb6076a7..75c05c9e2551486b3d9026d5648ebf3faaa4a3b9 100644 (file)
@@ -292,6 +292,18 @@ Do not send CLs removing the interior tags from such phrases.
   <a href="https://golang.org/design/draft-gobuild">https://golang.org/design/draft-gobuild</a>.
 </p>
 
+<h4 id="go run"><code>go</code> <code>run</code></h4>
+
+<p><!-- golang.org/issue/42088 -->
+  <code>go</code> <code>run</code> now accepts arguments with version suffixes
+  (for example, <code>go</code> <code>run</code>
+  <code>example.com/cmd@v1.0.0</code>).  This causes <code>go</code>
+  <code>run</code> to build and run 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 running executables without installing them or
+  without changing dependencies of the current module.
+</p>
+
 <h3 id="gofmt">Gofmt</h3>
 
 <p>