file/hash: less noisy debug output

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
Vincent Batts 2023-04-12 11:35:40 -04:00
parent 4c978a20e4
commit 1db230aad4
1 changed files with 3 additions and 3 deletions

View File

@ -32,10 +32,10 @@ func HashFileGetter(path string, hash crypto.Hash, ignoreSuffixes []string, work
return err
}
for _, suff := range ignoreSuffixes {
if os.Getenv("DEBUG") != "" {
fmt.Printf("[DEBUG] path: %q ; suff: %q\n", filepath.Clean(path), filepath.Clean(suff))
}
if strings.HasSuffix(filepath.Clean(path), filepath.Clean(suff)) {
if os.Getenv("DEBUG") != "" {
fmt.Printf("[DEBUG] skipping dir %q; has suff: %q\n", filepath.Clean(path), filepath.Clean(suff))
}
return filepath.SkipDir
}
}