fc-gpui-util 0.7.0

A collection of utility structs and functions for fc-gpui (originally from Zed - github.com/zed-industries/zed)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/// Whether a given environment variable name should have its value redacted
pub fn should_redact(env_var_name: &str) -> bool {
    const REDACTED_SUFFIXES: &[&str] = &[
        "KEY",
        "TOKEN",
        "PASSWORD",
        "SECRET",
        "PASS",
        "CREDENTIALS",
        "LICENSE",
    ];
    REDACTED_SUFFIXES
        .iter()
        .any(|suffix| env_var_name.ends_with(suffix))
}