MCPcopy Create free account
hub / github.com/cli/cli / RecordTelemetryForSubcommands

Function RecordTelemetryForSubcommands

pkg/cmdutil/telemetry.go:57–62  ·  view source on GitHub ↗

RecordTelemetryForSubcommands instruments all descendants of a command.

(cmd *cobra.Command, telemetry ghtelemetry.EventRecorder)

Source from the content-addressed store, hash-verified

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

Callers 2

NewCmdRootFunction · 0.92

Calls 1

RecordTelemetryFunction · 0.85

Tested by 1