]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: keep "go help" in unknown topic suggestion
authorJordi Martin <jordimartin@gmail.com>
Tue, 23 Jul 2019 18:27:06 +0000 (18:27 +0000)
committerBryan C. Mills <bcmills@google.com>
Tue, 23 Jul 2019 20:39:43 +0000 (20:39 +0000)
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 <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/cmd/go/internal/help/help.go

index d373771ab5a74789e3691dc36fd6f38f02aefac1..edb4a2a23caa838d4320dbc2ddf541776ca2cc5b 100644 (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'