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

Method Root

command.go:892–897  ·  view source on GitHub ↗

Root finds root command.

()

Source from the content-addressed store, hash-verified

890
891// Root finds root command.
892func (c *Command) Root() *Command {
893 if c.HasParent() {
894 return c.Parent().Root()
895 }
896 return c
897}
898
899// ArgsLenAtDash will return the length of c.Flags().Args at the moment
900// when a -- was found during args parsing.

Callers 12

getCompletionsMethod · 0.95
ExecuteCMethod · 0.95
InitDefaultHelpCmdMethod · 0.95
updateParentsPflagsMethod · 0.95
GetActiveHelpConfigFunction · 0.80
getEnvConfigFunction · 0.80
writeFlagHandlerFunction · 0.80
writeFlagsFunction · 0.80
genFunction · 0.80

Calls 2

HasParentMethod · 0.95
ParentMethod · 0.95

Tested by

no test coverage detected