VersionTemplate return version template for the command. This function is kept for backwards-compatibility reasons.
()
| 616 | // VersionTemplate return version template for the command. |
| 617 | // This function is kept for backwards-compatibility reasons. |
| 618 | func (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. |