From 09463c3b24f02c0b0fc009872e941e37e3d23865 Mon Sep 17 00:00:00 2001 From: nxshock Date: Wed, 10 Jul 2024 16:16:15 +0500 Subject: [PATCH] Remove unused variable --- walker.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/walker.go b/walker.go index 768d724..697e2d2 100644 --- a/walker.go +++ b/walker.go @@ -8,12 +8,12 @@ import ( log "github.com/sirupsen/logrus" ) -func removeOldFilesThread(path string, olderThan time.Duration) { +func removeOldFilesThread(olderThan time.Duration) { ticker := time.NewTicker(time.Hour) for range ticker.C { log.Debugln("Removing old files...") - err := removeOldFiles(path, olderThan) + err := removeOldFiles(olderThan) if err != nil { log.Println(err) } @@ -21,7 +21,7 @@ func removeOldFilesThread(path string, olderThan time.Duration) { } } -func removeOldFiles(path string, olderThan time.Duration) error { +func removeOldFiles(olderThan time.Duration) error { return filepath.Walk(config.StoragePath, func(path string, info os.FileInfo, err error) error { if err != nil { return err