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

Method SetHelpFunc

command.go:333–335  ·  view source on GitHub ↗

SetHelpFunc sets help function. Can be defined by Application.

(f func(*Command, []string))

Source from the content-addressed store, hash-verified

331
332// SetHelpFunc sets help function. Can be defined by Application.
333func (c *Command) SetHelpFunc(f func(*Command, []string)) {
334 c.helpFunc = f
335}
336
337// SetHelpCommand sets help command.
338func (c *Command) SetHelpCommand(cmd *Command) {

Callers 1

TestHelpFuncExecutedFunction · 0.95

Calls

no outgoing calls

Tested by 1

TestHelpFuncExecutedFunction · 0.76