devModeEnabled reads DevModeEnvVar and returns true for the usual truthy spellings. Kept as a package-level function so tests can swap the env var with t.Setenv.
()
| 87 | // spellings. Kept as a package-level function so tests can swap the env |
| 88 | // var with t.Setenv. |
| 89 | func devModeEnabled() bool { |
| 90 | v := strings.ToLower(strings.TrimSpace(os.Getenv(DevModeEnvVar))) |
| 91 | switch v { |
| 92 | case "1", "true", "yes", "on": |
| 93 | return true |
| 94 | default: |
| 95 | return false |
| 96 | } |
| 97 | } |
| 98 | |
| 99 | // Credentials is the per-tenant blob stashed in the secrets manager under |
| 100 | // CASBackend.SecretName. Despite the name it carries no access keys — only |
no outgoing calls
no test coverage detected