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

Function image_reference_registry_host

crates/openshell-driver-vm/src/driver.rs:3481–3492  ·  view source on GitHub ↗
(image_ref: &str)

Source from the content-addressed store, hash-verified

3479}
3480
3481fn image_reference_registry_host(image_ref: &str) -> &str {
3482 let mut parts = image_ref.splitn(2, '/');
3483 let first = parts.next().unwrap_or(image_ref);
3484 let has_path = parts.next().is_some();
3485 if has_path
3486 && (first.contains('.') || first.contains(':') || first.eq_ignore_ascii_case("localhost"))
3487 {
3488 first
3489 } else {
3490 "docker.io"
3491 }
3492}
3493
3494impl VmDriver {
3495 #[allow(clippy::too_many_arguments)]

Callers 1

registry_authFunction · 0.85

Calls 1

nextMethod · 0.45

Tested by

no test coverage detected