MCPcopy Index your code
hub / github.com/docker/docker-agent / GetTelemetryEnabled

Function GetTelemetryEnabled

pkg/telemetry/utils.go:21–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

19}
20
21func GetTelemetryEnabled() bool {
22 // Disable telemetry when running in tests to prevent HTTP calls
23 if flag.Lookup("test.v") != nil {
24 return false
25 }
26 return getTelemetryEnabledFromEnv()
27}
28
29// getTelemetryEnabledFromEnv checks only the environment variable,
30// without the test detection bypass. This allows testing the env var logic.

Callers 4

NewRootCmdFunction · 0.92
tuiOptsMethod · 0.92
TestGetTelemetryEnabledFunction · 0.85

Calls 2

LookupMethod · 0.45

Tested by 1

TestGetTelemetryEnabledFunction · 0.68