Used by Zarf to swap the registry domain/port part an image url without needed the docker libraries. usage in go:
// SwapHost Perform base url replacement and adds a sha1sum of the original url to the end of the src
func SwapHost(src string, targetHost string) (string, error) {
targetImage, err := getTargetImageFromURL(src)
return targetHost + "/" + targetImage, err
}