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