// GetRepository returns the given image's repository
GetRepository returns the given image's repository
// GetRepository returns the given image ' s repository
func GetRepository(imageRef string) (string, error) {
	matches := reference.NameRegexp.FindStringSubmatch(imageRef)
	if len(matches) > 0 {
		if len(strings.Split(matches[0], "/")) == 1 {
			return fmt.Sprintf("index.docker.io/%s", matches[0]), nil
		}
		return matches[0], nil
	}
	return "", fmt.Errorf("invalid repository")
}
func GetRepository ( imageRef string ) ( string , error ) { matches := reference . NameRegexp . FindStringSubmatch ( imageRef ) if len ( matches ) > 0 { if len ( strings . Split ( matches [ 0 ] , " " ) ) == 1 { return fmt . Sprintf ( " " , matches [ 0 ] ) , nil } return matches [ 0 ] , nil } return " " , fmt . Errorf ( " " ) }
GetRepository returns the given image's repository
GetRepository returns the given image ' s repository