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

Method Usage

command.go:478–480  ·  view source on GitHub ↗

Usage puts out the usage for the command. Used when a user provides invalid input. Can be defined by user by overriding UsageFunc.

()

Source from the content-addressed store, hash-verified

476// Used when a user provides invalid input.
477// Can be defined by user by overriding UsageFunc.
478func (c *Command) Usage() error {
479 return c.UsageFunc()(c)
480}
481
482// HelpFunc returns either the function set by SetHelpFunc for this command
483// or a parent, or it returns a function with default help behavior.

Callers 2

UsageStringMethod · 0.95
InitDefaultHelpCmdMethod · 0.80

Calls 1

UsageFuncMethod · 0.95

Tested by

no test coverage detected