aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/go/alldocs.go
diff options
context:
space:
mode:
authorJay Conrod <jayconrod@google.com>2020-10-29 15:49:05 -0400
committerJay Conrod <jayconrod@google.com>2020-11-09 18:32:36 +0000
commit65607683f531e30071e450858ef6bdc283a0280c (patch)
tree20b7867b17874093cb79c5125c3bdfaf2dc37992 /src/cmd/go/alldocs.go
parenta6462a608d60b6175db9dd9a7244b9609a12e7fc (diff)
downloadgo-65607683f531e30071e450858ef6bdc283a0280c.tar.gz
go-65607683f531e30071e450858ef6bdc283a0280c.zip
cmd/go: print deprecation messages for 'go get' installing executables
For #40276 Change-Id: I5e631a4c9ce07f23640fb56eb455457bc55072c6 Reviewed-on: https://go-review.googlesource.com/c/go/+/266360 Run-TryBot: Jay Conrod <jayconrod@google.com> TryBot-Result: Go Bot <gobot@golang.org> Trust: Jay Conrod <jayconrod@google.com> Reviewed-by: Bryan C. Mills <bcmills@google.com>
Diffstat (limited to 'src/cmd/go/alldocs.go')
-rw-r--r--src/cmd/go/alldocs.go15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/cmd/go/alldocs.go b/src/cmd/go/alldocs.go
index e68fa55d09..4461be2d09 100644
--- a/src/cmd/go/alldocs.go
+++ b/src/cmd/go/alldocs.go
@@ -673,6 +673,17 @@
// The second step is to download (if needed), build, and install
// the named packages.
//
+// The -d flag instructs get to skip this step, downloading source code
+// needed to build the named packages and their dependencies, but not
+// building or installing.
+//
+// Building and installing packages with get is deprecated. In a future release,
+// the -d flag will be enabled by default, and 'go get' will be only be used to
+// adjust dependencies of the current module. To install a package using
+// dependencies from the current module, use 'go install'. To install a package
+// ignoring the current module, use 'go install' with an @version suffix like
+// "@latest" after each argument.
+//
// If an argument names a module but not a package (because there is no
// Go source code in the module's root directory), then the install step
// is skipped for that argument, instead of causing a build failure.
@@ -684,10 +695,6 @@
// adds the latest golang.org/x/perf and then installs the commands in that
// latest version.
//
-// The -d flag instructs get to download the source code needed to build
-// the named packages, including downloading necessary dependencies,
-// but not to build and install them.
-//
// With no package arguments, 'go get' applies to Go package in the
// current directory, if any. In particular, 'go get -u' and
// 'go get -u=patch' update all the dependencies of that package.