func parseImg(s string) (*image, error) {
	repo := strings.SplitN(s, "/", 2)
	if len(repo) < 2 {
		return nil, fmt.Errorf("Unable to parse image from string: %s", s)
	}
	i := strings.SplitN(repo[1], ":", 2)
	res := &image{
		namespace: repo[0],
		repo:      i[0],
	}
	if len(i) == 2 {
		res.tag = i[1]
	}
	return res, nil
}
// build Image accepts a string like library/ubuntu:14.04 and build a image struct
build Image accepts a string like library/ubuntu:14.04 and build a image struct
// build Image accepts a string like library / ubuntu : 14 . 04 and build a image struct
func parseImg(s string) (*image, error) {
	repo := strings.SplitN(s, "/", 2)
	if len(repo) < 2 {
		return nil, fmt.Errorf("Unable to parse image from string: %s", s)
	}
	i := strings.SplitN(repo[1], ":", 2)
	res := &image{
		namespace: repo[0],
		repo:      i[0],
	}
	if len(i) == 2 {
		res.tag = i[1]
	}
	return res, nil
}
func parseImg ( s string ) ( * image , error ) { repo := strings . SplitN ( s , " " , 2 ) if len ( repo ) < 2 { return nil , fmt . Errorf ( " " , s ) } i := strings . SplitN ( repo [ 1 ] , " " , 2 ) res := & image { namespace : repo [ 0 ] , repo : i [ 0 ] , } if len ( i ) == 2 { res . tag = i [ 1 ] } return res , nil }
build Image accepts a string like library/ubuntu:14.04 and build a image struct
build Image accepts a string like library / ubuntu : 14 . 04 and build a image struct