1
0
mirror of https://github.com/golang/go synced 2024-11-26 13:08:08 -07:00

cmd/go: replace a TODO with an explanatory comment

I left a TODO to decide whether to add 'go get' arguments as indirect
(as we have in the past), or to make them direct. I considered both
options, and decided to keep the indirect default because it is easier
(and less invasive) for users to fix.

Updates #45979

Change-Id: I1f23a88db59a01bdd9e6fe48c2fffc8a3b55145a
Reviewed-on: https://go-review.googlesource.com/c/go/+/328971
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Michael Matloob <matloob@golang.org>
This commit is contained in:
Bryan C. Mills 2021-06-17 14:12:34 -04:00
parent 4dede02550
commit ed834853ad

View File

@ -10,10 +10,12 @@ stderr '^m.go:3:8: no required module provides package rsc\.io/quote; to add it:
# When we run the suggested 'go get' command, the new dependency can be used
# immediately, even though 'go get' marks it as 'indirect'.
# immediately.
#
# TODO(#45979): Should we swap this default state, so that new dependencies
# are added as direct unless otherwise noted?
# 'go get' marks the new dependency as 'indirect', because it doesn't scan
# enough source code to know whether it is direct, and it is easier and less
# invasive to remove an incorrect indirect mark (e.g. using 'go get') than to
# add one that is missing ('go mod tidy' or 'go mod vendor').
go get rsc.io/quote
grep 'rsc.io/quote v\d+\.\d+\.\d+ // indirect$' go.mod