m/cup
1
0
mirror of https://github.com/sergi0g/cup.git synced 2025-11-17 01:23:39 -05:00
This commit is contained in:
Sergio
2024-09-01 19:57:15 +03:00
parent 2f195f611c
commit 1ba67c8af0
7 changed files with 110 additions and 54 deletions

View File

@@ -32,9 +32,9 @@ pub fn split_image(image: &str) -> (String, String, String) {
match RE.captures(image) {
Some(c) => {
let registry = match c.name("registry") {
Some(registry) => registry.as_str().to_owned(),
None => String::from("registry-1.docker.io"),
};
Some(registry) => registry.as_str().to_owned(),
None => String::from("registry-1.docker.io"),
};
return (
registry.clone(),
match c.name("repository") {
@@ -52,7 +52,7 @@ pub fn split_image(image: &str) -> (String, String, String) {
Some(tag) => tag.as_str().to_owned(),
None => String::from("latest"),
},
)
);
}
None => error!("Failed to parse image {}", image),
}