From 1db230aad44de0b20a2a460d152ce1a79f38ff16 Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Wed, 12 Apr 2023 11:35:40 -0400 Subject: [PATCH] file/hash: less noisy debug output Signed-off-by: Vincent Batts --- file/hash.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/file/hash.go b/file/hash.go index 309e002..220fa3f 100644 --- a/file/hash.go +++ b/file/hash.go @@ -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 } }