From b23ff2c8f98cb0c8d93397623243ce53b937ac72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Fri, 31 May 2019 10:46:00 +0100 Subject: [PATCH] cmd/go: recommend -d when -m is used MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In #32038, it was decided to remove get's -m, since one former use case is removed, and the other can be done via -d, as pointed by Russ. However, a user getting this short error might not realise that they can switch to -d to skip building packages. Add a short mention to point them in the right direction. It's important to note "packages", because -m was a flag that acted on modules, while -d acts on packages. Simply replacing -m with -d might not be enough in some cases because of that distinction. Change-Id: I0947b25c4223bdad3cd0e535848527da8db8a16d Reviewed-on: https://go-review.googlesource.com/c/go/+/179361 Reviewed-by: Jay Conrod Reviewed-by: Bryan C. Mills Run-TryBot: Daniel Martí TryBot-Result: Gobot Gobot --- src/cmd/go/internal/modget/get.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmd/go/internal/modget/get.go b/src/cmd/go/internal/modget/get.go index 2d5eb03cd8..c3537a3f5a 100644 --- a/src/cmd/go/internal/modget/get.go +++ b/src/cmd/go/internal/modget/get.go @@ -258,7 +258,7 @@ func runGet(cmd *base.Command, args []string) { fmt.Fprintf(os.Stderr, "go get: -fix flag is a no-op when using modules\n") } if *getM { - base.Fatalf("go get: -m flag is no longer supported") + base.Fatalf("go get: -m flag is no longer supported; consider -d to skip building packages") } modload.LoadTests = *getT