MCPcopy Index your code
hub / github.com/docker/cli / getFullCommandName

Function getFullCommandName

cli/command/telemetry_utils.go:168–173  ·  view source on GitHub ↗

getFullCommandName gets the full cobra command name in the format `... parentCommandName commandName` by traversing it's parent commands recursively until the root command is reached.

(cmd *cobra.Command)

Source from the content-addressed store, hash-verified

166// `... parentCommandName commandName` by traversing it's parent commands recursively
167// until the root command is reached.
168func getFullCommandName(cmd *cobra.Command) string {
169 if cmd.HasParent() {
170 return fmt.Sprintf("%s %s", getFullCommandName(cmd.Parent()), cmd.Name())
171 }
172 return cmd.Name()
173}
174
175// getDefaultMeter gets the default metric.Meter for the application
176// using the given metric.MeterProvider

Callers 2

TestGetFullCommandNameFunction · 0.85
getCommandNameFunction · 0.85

Calls 2

ParentMethod · 0.80
NameMethod · 0.45

Tested by 1

TestGetFullCommandNameFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…