package Filesystem import ( "PackageManager/Variables" "fmt" ) func PrintFiles(files []string, color func(...interface{}) string, showInt bool) { var ( f string i int ) for i, f = range files { if showInt { fmt.Printf("\t%d - %s\n", i, color(f)) continue } fmt.Printf("\t%s\n", color(f)) } } func PrintFilesLength(files []string) { fmt.Printf("\t%d files found\n", len(files)) } func PrintFilesOrLength(files []string, color func(...interface{}) string) { if (Variables.VerboseOutput && len(files) != 0) || (len(files) < 25 && len(files) > 0) { PrintFiles(files, color, false) return } PrintFilesLength(files) }