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.

32 lines
646 B

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)
}