Utility to check if the CAVE_ENV environment variable indicates production mode.
// Source: https://github.com/JuliusBrussee/caveman | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works // Provided via justclaw.it.com; keep this notice with the code. // Package runtimeenv provides process-wide environment predicates shared by // security gates. Keeping the production spelling in a dependency-free package // avoids a cycle between platform/env and platform/kms while ensuring every // service treats case and surrounding whitespace identically. package runtimeenv import ( "os" "strings" ) // IsProduction reports whether CAVE_ENV selects the managed production posture. // Empty and unknown values remain local; only the canonical value (folded for // operator-friendly case/whitespace) enables production refusals. func IsProductio ... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key