()
| 19 | } |
| 20 | |
| 21 | func 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. |