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.

25 lines
537 B

package Filesystem
import (
"PackageManager/Variables"
"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 (Variables.VerboseOutput && len(files) != 0) || (len(files) < 25 && len(files) > 0) {
PrintFiles(files, color)
return
}
PrintFilesLength(files)
}