func parseCommaDelimitedList(list string) (map[string][]string, error) {
	mapping := map[string][]string{}
	for _, r := range strings.Split(list, ",") {
		value := strings.TrimSpace(r)
		if strings.Count(value, "/") != 1 {
			return nil, fmt.Errorf("invalid org/repo value %q", value)
		}
		parts := strings.SplitN(value, "/", 2)
		if others, exist := mapping[parts[0]]; !exist {
			mapping[parts[0]] = []string{parts[1]}
		} else {
			mapping[parts[0]] = append(others, parts[1])
		}
	}
	return mapping, nil
}
func parseCommaDelimitedList(list string) (map[string][]string, error) {
	mapping := map[string][]string{}
	for _, r := range strings.Split(list, ",") {
		value := strings.TrimSpace(r)
		if strings.Count(value, "/") != 1 {
			return nil, fmt.Errorf("invalid org/repo value %q", value)
		}
		parts := strings.SplitN(value, "/", 2)
		if others, exist := mapping[parts[0]]; !exist {
			mapping[parts[0]] = []string{parts[1]}
		} else {
			mapping[parts[0]] = append(others, parts[1])
		}
	}
	return mapping, nil
}
func parseCommaDelimitedList ( list string ) ( map [ string ] [ ] string , error ) { mapping := map [ string ] [ ] string { } for _ , r := range strings . Split ( list , " " ) { value := strings . TrimSpace ( r ) if strings . Count ( value , " " ) != 1 { return nil , fmt . Errorf ( " " , value ) } parts := strings . SplitN ( value , " " , 2 ) if others , exist := mapping [ parts [ 0 ] ] ; ! exist { mapping [ parts [ 0 ] ] = [ ] string { parts [ 1 ] } } else { mapping [ parts [ 0 ] ] = append ( others , parts [ 1 ] ) } } return mapping , nil }
// parseCommaDelimitedList parses values in the format:
//   org/repo,org2/repo2,org/repo3
// into a mapping of org to repos, i.e.:
//   org:  repo, repo3
//   org2: repo2
parseCommaDelimitedList parses values in the format : org / repo org2 / repo2 org / repo3 into a mapping of org to repos i . e . : org : repo repo3 org2 : repo2