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

Method CommandPath

command.go:1465–1470  ·  view source on GitHub ↗

CommandPath returns the full path to this command.

()

Source from the content-addressed store, hash-verified

1463
1464// CommandPath returns the full path to this command.
1465func (c *Command) CommandPath() string {
1466 if c.HasParent() {
1467 return c.Parent().CommandPath() + " " + c.Name()
1468 }
1469 return c.DisplayName()
1470}
1471
1472// DisplayName returns the name to display in help text. Returns command Name()
1473// If CommandDisplayNameAnnoation is not set

Callers 15

ExecuteCMethod · 0.95
legacyArgsFunction · 0.80
NoArgsFunction · 0.80
OnlyValidArgsFunction · 0.80
genFunction · 0.80
checkCommandGroupsMethod · 0.80
AddCommandMethod · 0.80
RemoveCommandMethod · 0.80
UseLineMethod · 0.80
defaultUsageFuncFunction · 0.80
TestGenManDocFunction · 0.80

Calls 4

HasParentMethod · 0.95
ParentMethod · 0.95
NameMethod · 0.95
DisplayNameMethod · 0.95

Tested by 3

TestGenManDocFunction · 0.64
TestGenYamlDocFunction · 0.64