RecordTelemetryForSubcommands instruments all descendants of a command.
(cmd *cobra.Command, telemetry ghtelemetry.EventRecorder)
| 55 | |
| 56 | // RecordTelemetryForSubcommands instruments all descendants of a command. |
| 57 | func RecordTelemetryForSubcommands(cmd *cobra.Command, telemetry ghtelemetry.EventRecorder) { |
| 58 | for _, c := range cmd.Commands() { |
| 59 | RecordTelemetry(c, telemetry) |
| 60 | RecordTelemetryForSubcommands(c, telemetry) |
| 61 | } |
| 62 | } |
| 63 | |
| 64 | func DisableTelemetry(cmd *cobra.Command) { |
| 65 | if cmd.Annotations == nil { |