code: func parseRepoURL(image string) (*parsedURL, error) {
  	parsed, err := url.Parse("https://" + image)
  	if err != nil {
  		return nil, fmt.Errorf("error parsing image %s %v", image, err)
  	}
  	splitURL := ecrPattern.FindStringSubmatch(parsed.Hostname())
  	if len(splitURL) == 0 {
  		return nil, fmt.Errorf("%s is not a valid ECR repository URL", parsed.Hostname())
  	}
  	return &parsedURL{
  		registryID: splitURL[1],
  		region:     splitURL[3],
  		registry:   parsed.Hostname(),
  	}, nil
  }
docs: // parseRepoURL parses and splits the registry URL into the registry ID,
  // region, and registry.
  // <registryID>.dkr.ecr(-fips).<region>.amazonaws.com(.cn)