// checkImageURL checks a Docker image URL is valid
checkImageURL checks a Docker image URL is valid
// checkImageURL checks a Docker image URL is valid
func checkImageURL(imageURL string) error {
	if len(imageURL) < 6 {
		return fmt.Errorf("imageURL should have at least 6 characters")
	}
	match, err := regexp.MatchString(`^[a-zA-Z0-9\._\/\-]{6,256}$`, imageURL)
	if err != nil {
		return err
	}
	if !match {
		return fmt.Errorf("docker image URL should be format like [hub.your-registry.com/group/]your_image_name")
	}
	return nil
}
func checkImageURL ( imageURL string ) error { if len ( imageURL ) < 6 { return fmt . Errorf ( " " ) } match , err := regexp . MatchString ( `^[a-zA-Z0-9\._\/\-]{6,256}$` , imageURL ) if err != nil { return err } if ! match { return fmt . Errorf ( " " ) } return nil }
checkImageURL checks a Docker image URL is valid
checkImageURL checks a Docker image URL is valid