From 8098d711f38c1136b771d9f637a5a2fd919d4d31 Mon Sep 17 00:00:00 2001 From: Bobby Powers Date: Thu, 16 Feb 2012 14:05:17 -0500 Subject: [PATCH] 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 --- src/cmd/go/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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}} -- 2.50.0