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:
parent
e8c7e639ea
commit
68e28998d7
@ -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'
|
||||
|
Loading…
Reference in New Issue
Block a user