mirror of
https://github.com/tailscale/tailscale.git
synced 2026-11-25 19:21:18 -08:00
This patch adds def.Getenv and def.GetenvBool to provide defaults for environment variables that are unset or blank or invalid. This replaces the implementations of defaultEnv and defaultBool in cmd/containerboot and cmd/k8s-operator. However, the implementation of defaultBool in cmd/k8s-operator was actually buggy and wouldn’t fall back to the default if the environment contained a non-boolean value. This patch fixes this. Updates #20018 Signed-off-by: Simon Law <[email protected]>