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

Function is_dns_label

crates/openshell-core/src/config.rs:770–777  ·  view source on GitHub ↗
(label: &str)

Source from the content-addressed store, hash-verified

768}
769
770fn is_dns_label(label: &str) -> bool {
771 if label.is_empty() || label.len() > 63 || label.starts_with('-') || label.ends_with('-') {
772 return false;
773 }
774 label
775 .bytes()
776 .all(|byte| byte.is_ascii_lowercase() || byte.is_ascii_digit() || byte == b'-')
777}
778
779fn default_log_level() -> String {
780 "info".to_string()

Callers 1

Calls 2

lenMethod · 0.80
is_emptyMethod · 0.45

Tested by

no test coverage detected