]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: fix 'go help <command>'
authorBobby Powers <bobbypowers@gmail.com>
Thu, 16 Feb 2012 19:05:17 +0000 (14:05 -0500)
committerRuss Cox <rsc@golang.org>
Thu, 16 Feb 2012 19:05:17 +0000 (14:05 -0500)
It depended on the old behavior of functions in structs.

R=golang-dev, rsc
CC=golang-dev, r
https://golang.org/cl/5656076

src/cmd/go/main.go

index c688a739d0f750073051c4f02ca97dbc51a12a34..b07d720e86a6ca8bd6414160c31270903e8841d7 100644 (file)
@@ -157,7 +157,7 @@ Use "go help [topic]" for more information about that topic.
 
 `
 
-var helpTemplate = `{{if .Run}}usage: go {{.UsageLine}}
+var helpTemplate = `{{if .Runnable}}usage: go {{.UsageLine}}
 
 {{end}}{{.Long | trim}}
 `
@@ -169,7 +169,7 @@ var documentationTemplate = `// Copyright 2011 The Go Authors.  All rights reser
 /*
 {{range .}}{{if .Short}}{{.Short | capitalize}}
 
-{{end}}{{if .Run}}Usage:
+{{end}}{{if .Runnable}}Usage:
 
        go {{.UsageLine}}