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

Method VersionTemplate

command.go:618–627  ·  view source on GitHub ↗

VersionTemplate return version template for the command. This function is kept for backwards-compatibility reasons.

()

Source from the content-addressed store, hash-verified

616// VersionTemplate return version template for the command.
617// This function is kept for backwards-compatibility reasons.
618func (c *Command) VersionTemplate() string {
619 if c.versionTemplate != nil {
620 return c.versionTemplate.tmpl
621 }
622
623 if c.HasParent() {
624 return c.parent.VersionTemplate()
625 }
626 return defaultVersionTemplate
627}
628
629// getVersionTemplateFunc returns the version template function for the command
630// going up the command tree if necessary.

Callers

nothing calls this directly

Calls 1

HasParentMethod · 0.95

Tested by

no test coverage detected