MCPcopy Create free account
hub / github.com/algolia/cli / ShouldTrackUsage

Function ShouldTrackUsage

pkg/cmdutil/telemetry_check.go:5–16  ·  view source on GitHub ↗
(cmd *cobra.Command)

Source from the content-addressed store, hash-verified

3import "github.com/spf13/cobra"
4
5func ShouldTrackUsage(cmd *cobra.Command) bool {
6 switch cmd.Name() {
7 case "help", "powershell", cobra.ShellCompRequestCmd, cobra.ShellCompNoDescRequestCmd:
8 return false
9 }
10
11 if cmd.Parent() != nil && cmd.Parent().Name() == "completion" {
12 return false
13 }
14
15 return true
16}

Callers 3

ExecuteFunction · 0.92
trackCommandCompletedFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected