PackageManager just because
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
459 B

package Filesystem
import (
"fmt"
)
func PrintFiles(files []string, color func(...interface{}) string) {
var f string
for _, f = range files {
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 len(files) < 25 && len(files) > 0 {
PrintFiles(files, color)
return
}
PrintFilesLength(files)
}