1
0
mirror of https://github.com/golang/go synced 2024-09-29 07:24:32 -06:00

cmd/go: keep "go help" in unknown topic suggestion

Fixed missing concatenation to build the suggested command.

Fixes #33153

Change-Id: I26c02f2966247aa07d1447b8ec1a2203046842dd
GitHub-Last-Rev: 9631abf1d0
GitHub-Pull-Request: golang/go#33245
Reviewed-on: https://go-review.googlesource.com/c/go/+/187217
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Jordi Martin 2019-07-23 18:27:06 +00:00 committed by Bryan C. Mills
parent e8c7e639ea
commit 68e28998d7

View File

@ -63,7 +63,7 @@ Args:
// helpSuccess is the help command using as many args as possible that would succeed.
helpSuccess := "go help"
if i > 0 {
helpSuccess = " " + strings.Join(args[:i], " ")
helpSuccess += " " + strings.Join(args[:i], " ")
}
fmt.Fprintf(os.Stderr, "go help %s: unknown help topic. Run '%s'.\n", strings.Join(args, " "), helpSuccess)
base.SetExitStatus(2) // failed at 'go help cmd'