From: Bobby Powers Date: Thu, 16 Feb 2012 19:05:17 +0000 (-0500) Subject: cmd/go: fix 'go help ' X-Git-Tag: weekly.2012-02-22~187 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=8098d711f38c1136b771d9f637a5a2fd919d4d31;p=gostls13.git cmd/go: fix 'go help ' It depended on the old behavior of functions in structs. R=golang-dev, rsc CC=golang-dev, r https://golang.org/cl/5656076 --- diff --git a/src/cmd/go/main.go b/src/cmd/go/main.go index c688a739d0..b07d720e86 100644 --- a/src/cmd/go/main.go +++ b/src/cmd/go/main.go @@ -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}}