pub fn ensure_https_prefix(url: &mut String)Expand description
Add https:// to a URL if it is not already present
ยงExample
// If the URL does not have the https prefix, it is added
let mut url = String::from("github.com/docker/buildx/issues");
ensure_https_prefix(&mut url);
assert_eq!(url, "https://github.com/docker/buildx/issues");
// If the URL already has the https prefix, it is not modified
let mut url = String::from("https://gitlab.com/foo-org/foo-repo");
ensure_https_prefix(&mut url);
assert_eq!(url, String::from("https://gitlab.com/foo-org/foo-repo"));