MCPcopy
hub / github.com/spf13/cobra / HelpTemplate

Method HelpTemplate

command.go:605–614  ·  view source on GitHub ↗

HelpTemplate return help template for the command. This function is kept for backwards-compatibility reasons.

()

Source from the content-addressed store, hash-verified

603// HelpTemplate return help template for the command.
604// This function is kept for backwards-compatibility reasons.
605func (c *Command) HelpTemplate() string {
606 if c.helpTemplate != nil {
607 return c.helpTemplate.tmpl
608 }
609
610 if c.HasParent() {
611 return c.parent.HelpTemplate()
612 }
613 return defaultHelpTemplate
614}
615
616// VersionTemplate return version template for the command.
617// This function is kept for backwards-compatibility reasons.

Callers

nothing calls this directly

Calls 1

HasParentMethod · 0.95

Tested by

no test coverage detected