func globGetFiles(args globArgs) []string { f, err := globGetFilesFromFilelist(args.filelist) if err != nil { common.Die("Failed to get files from filelist %q: %v", args.filelist, err) } return common.MapFilesToDirectories(f, args.mapTo) }
func main() { filename, mapTo := getValidArgs() list := getListing(filename) pairs := getPairs(list) for _, pair := range pairs { toClean := common.MapFilesToDirectories(*pair.data, mapTo) fmt.Printf("%s += %s\n", pair.name, strings.Join(toClean, " ")) } }