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

Function host_patterns_overlap

crates/openshell-prover/src/credentials.rs:173–180  ·  view source on GitHub ↗
(left: &str, right: &str)

Source from the content-addressed store, hash-verified

171}
172
173fn host_patterns_overlap(left: &str, right: &str) -> bool {
174 let left = normalize_host(left);
175 let right = normalize_host(right);
176 if left.is_empty() || right.is_empty() {
177 return false;
178 }
179 left == right || host_pattern_covers(&left, &right) || host_pattern_covers(&right, &left)
180}
181
182fn host_pattern_covers(pattern: &str, host: &str) -> bool {
183 let pattern_labels: Vec<&str> = pattern.split('.').collect();

Callers 2

credentials_for_hostMethod · 0.85
api_for_hostMethod · 0.85

Calls 3

host_pattern_coversFunction · 0.85
normalize_hostFunction · 0.70
is_emptyMethod · 0.45

Tested by

no test coverage detected