MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / is_valid_env_name

Function is_valid_env_name

crates/openshell-cli/src/run.rs:4010–4019  ·  view source on GitHub ↗
(key: &str)

Source from the content-addressed store, hash-verified

4008}
4009
4010fn is_valid_env_name(key: &str) -> bool {
4011 let mut bytes = key.bytes();
4012 let Some(first) = bytes.next() else {
4013 return false;
4014 };
4015 if !(first == b'_' || first.is_ascii_alphabetic()) {
4016 return false;
4017 }
4018 bytes.all(|b| b == b'_' || b.is_ascii_alphanumeric())
4019}
4020
4021fn parse_credential_pairs(items: &[String]) -> Result<HashMap<String, String>> {
4022 let mut map = HashMap::new();

Callers 1

parse_env_pairsFunction · 0.85

Calls 1

nextMethod · 0.45

Tested by

no test coverage detected