MCPcopy
hub / github.com/owenthereal/ccat / Name

Method Name

Godeps/_workspace/src/github.com/spf13/cobra/command.go:780–790  ·  view source on GitHub ↗

Name returns the command's name: the first word in the use line.

()

Source from the content-addressed store, hash-verified

778
779// Name returns the command's name: the first word in the use line.
780func (c *Command) Name() string {
781 if c.name != "" {
782 return c.name
783 }
784 name := c.Use
785 i := strings.Index(name, " ")
786 if i >= 0 {
787 name = name[:i]
788 }
789 return name
790}
791
792// Determine if a given string is an alias of the command.
793func (c *Command) HasAlias(s string) bool {

Callers 15

GenBashCompletionMethod · 0.95
FindMethod · 0.95
executeMethod · 0.95
initHelpMethod · 0.95
CommandPathMethod · 0.95
DebugFlagsMethod · 0.95
NameAndAliasesMethod · 0.95
FlagsMethod · 0.95
LocalFlagsMethod · 0.95
InheritedFlagsMethod · 0.95
PersistentFlagsMethod · 0.95
ResetFlagsMethod · 0.95

Calls

no outgoing calls

Tested by 3

TestAsHTMLFunction · 0.64
TestAnnotate_FilesFunction · 0.64
TestBashCompletionsFunction · 0.64