From 68e28998d7f094e70cef7ec0bef9fabfa9e17d07 Mon Sep 17 00:00:00 2001 From: Jordi Martin Date: Tue, 23 Jul 2019 18:27:06 +0000 Subject: [PATCH] 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: 9631abf1d0d187cbd94495a2a789e5863b421441 GitHub-Pull-Request: golang/go#33245 Reviewed-on: https://go-review.googlesource.com/c/go/+/187217 Reviewed-by: Bryan C. Mills Run-TryBot: Bryan C. Mills TryBot-Result: Gobot Gobot --- src/cmd/go/internal/help/help.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmd/go/internal/help/help.go b/src/cmd/go/internal/help/help.go index d373771ab5..edb4a2a23c 100644 --- a/src/cmd/go/internal/help/help.go +++ b/src/cmd/go/internal/help/help.go @@ -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' -- 2.50.0