Remove unused variable

This commit is contained in:
nxshock 2024-07-10 16:16:15 +05:00
parent c2cbf59793
commit 09463c3b24

View File

@ -8,12 +8,12 @@ import (
log "github.com/sirupsen/logrus" log "github.com/sirupsen/logrus"
) )
func removeOldFilesThread(path string, olderThan time.Duration) { func removeOldFilesThread(olderThan time.Duration) {
ticker := time.NewTicker(time.Hour) ticker := time.NewTicker(time.Hour)
for range ticker.C { for range ticker.C {
log.Debugln("Removing old files...") log.Debugln("Removing old files...")
err := removeOldFiles(path, olderThan) err := removeOldFiles(olderThan)
if err != nil { if err != nil {
log.Println(err) 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 { return filepath.Walk(config.StoragePath, func(path string, info os.FileInfo, err error) error {
if err != nil { if err != nil {
return err return err