Imports #
"bufio"
"fmt"
"io"
"os"
"strings"
"text/template"
"unicode"
"unicode/utf8"
"cmd/go/internal/base"
"cmd/internal/telemetry/counter"
"cmd/go/internal/base"
"bufio"
"fmt"
"io"
"os"
"strings"
"text/template"
"unicode"
"unicode/utf8"
"cmd/go/internal/base"
"cmd/internal/telemetry/counter"
"cmd/go/internal/base"
var HelpBuildConstraint = *ast.UnaryExprvar HelpBuildJSON = *ast.UnaryExprvar HelpBuildmode = *ast.UnaryExprvar HelpC = *ast.UnaryExprvar HelpCache = *ast.UnaryExprvar HelpEnvironment = *ast.UnaryExprvar HelpFileType = *ast.UnaryExprvar HelpGoAuth = *ast.UnaryExprvar HelpGopath = *ast.UnaryExprvar HelpImportPath = *ast.UnaryExprvar HelpPackages = *ast.UnaryExprvar counterErrorsHelpUnknownTopic = *ast.CallExprvar documentationTemplate = *ast.BinaryExprvar helpTemplate = `{{if .Runnable}}usage: {{.UsageLine}}
{{end}}{{.Long | trim}}
`var usageTemplate = `{{.Long | trim}}
Usage:
	{{.UsageLine}}  [arguments]
The commands are:
{{range .Commands}}{{if or (.Runnable) .Commands}}
	{{.Name | printf "%-11s"}} {{.Short}}{{end}}{{end}}
Use "go help{{with .LongName}} {{.}}{{end}} " for more information about a command.
{{if eq (.UsageLine) "go"}}
Additional help topics:
{{range .Commands}}{{if and (not .Runnable) (not .Commands)}}
	{{.Name | printf "%-15s"}} {{.Short}}{{end}}{{end}}
Use "go help{{with .LongName}} {{.}}{{end}} " for more information about that topic.
{{end}}
`   commentWriter writes a Go comment to the underlying io.Writer, using line comment form (//).
type commentWriter struct {
W io.Writer
wroteSlashes bool
}An errWriter wraps a writer, recording whether a write error occurred.
type errWriter struct {
w io.Writer
err error
}Help implements the 'help' command.
func Help(w io.Writer, args []string)func PrintUsage(w io.Writer, cmd *base.Command)func (c *commentWriter) Write(p []byte) (int, error)func (w *errWriter) Write(b []byte) (int, error)func capitalize(s string) stringtmpl executes the given template text on data, writing the result to w.
func tmpl(w io.Writer, text string, data any)Generated with Arrow