MCPcopy Create free account
hub / github.com/52funny/pikpakcli / canonicalCommandKey

Function canonicalCommandKey

internal/shell/shell.go:494–504  ·  view source on GitHub ↗
(rootCmd *cobra.Command, cmd *cobra.Command)

Source from the content-addressed store, hash-verified

492}
493
494func canonicalCommandKey(rootCmd *cobra.Command, cmd *cobra.Command) string {
495 if cmd == nil {
496 return ""
497 }
498 path := cmd.CommandPath()
499 rootName := rootCmd.Name()
500 if path == rootName {
501 return ""
502 }
503 return strings.TrimPrefix(path, rootName+" ")
504}
505
506type shellArgFlags struct {
507 hasPath bool

Callers 3

DoMethod · 0.85
adaptShellArgsFunction · 0.85
expandShellGlobsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected