Skip to main content

env_with_file_fallback

Function env_with_file_fallback 

Source
pub fn env_with_file_fallback(name: &str) -> Option<String>
Expand description

Read name from the env. If unset/empty, fall back to <name>_FILE. Returns None when neither produces a usable value. Trims trailing whitespace from file contents.