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

Method SetHelpTemplate

command.go:358–364  ·  view source on GitHub ↗

SetHelpTemplate sets help template to be used. Application can use it to set custom template.

(s string)

Source from the content-addressed store, hash-verified

356
357// SetHelpTemplate sets help template to be used. Application can use it to set custom template.
358func (c *Command) SetHelpTemplate(s string) {
359 if s == "" {
360 c.helpTemplate = nil
361 return
362 }
363 c.helpTemplate = tmpl(s)
364}
365
366// SetVersionTemplate sets version template to be used. Application can use it to set custom template.
367func (c *Command) SetVersionTemplate(s string) {

Callers 1

TestSetHelpTemplateFunction · 0.95

Calls 1

tmplFunction · 0.85

Tested by 1

TestSetHelpTemplateFunction · 0.76