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)
| 166 | // `... parentCommandName commandName` by traversing it's parent commands recursively |
| 167 | // until the root command is reached. |
| 168 | func 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 |
searching dependent graphs…