1
0
Fork 0
mirror of https://github.com/vbatts/dedupe-linker.git synced 2024-11-23 17:05:41 +00:00

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

View file

@ -32,10 +32,10 @@ func HashFileGetter(path string, hash crypto.Hash, ignoreSuffixes []string, work
return err return err
} }
for _, suff := range ignoreSuffixes { 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 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 return filepath.SkipDir
} }
} }