diff options
| author | Paul Buetow <paul@buetow.org> | 2024-12-11 22:07:51 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2024-12-11 22:07:51 +0200 |
| commit | 1dca76e728a70b70ee8001c87407acf962e731cd (patch) | |
| tree | 4636d5b8769595de135bca8977b951d0a570da48 /internal/queue/queue.go | |
| parent | a5529938536f7a530f0c55e5a82b16a4c80af5b4 (diff) | |
refactor a bit again
Diffstat (limited to 'internal/queue/queue.go')
| -rw-r--r-- | internal/queue/queue.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/internal/queue/queue.go b/internal/queue/queue.go index 4a894dc..80f6dcd 100644 --- a/internal/queue/queue.go +++ b/internal/queue/queue.go @@ -52,7 +52,7 @@ func queueEntries(args config.Args) error { destPath := fmt.Sprintf("%s/db/%s.%s.queued", args.GosDir, filepath.Base(en.Path), timestamp.Now()) if args.DryRun { - _, _ = colour.Infoln("Not queueing entry", en.Path, "to", destPath, "as dry-run mode enabled") + colour.Infoln("Not queueing entry", en.Path, "to", destPath, "as dry-run mode enabled") continue } if err := oi.Rename(en.Path, destPath); err != nil { @@ -89,7 +89,7 @@ func queuePlatforms(args config.Args) error { return err } if share.Excluded(platform.String()) { - _, _ = colour.Infoln("Not queueing entry", en, "to platform", platform, "as it is excluded") + colour.Infoln("Not queueing entry", en, "to platform", platform, "as it is excluded") continue } if err := queuePlatform(en, args.GosDir, platform); err != nil { @@ -102,7 +102,7 @@ func queuePlatforms(args config.Args) error { // Keep queued items in trash for a while. trashPath := filepath.Join(trashDir, strings.TrimSuffix(filepath.Base(en.Path), ".queued")+".trash") - _, _ = colour.Infof("Trashing %s -> %s", en.Path, trashPath) + colour.Infof("Trashing %s -> %s", en.Path, trashPath) fmt.Print("\n") if err := oi.EnsureParentDir(trashPath); err != nil { return err @@ -124,11 +124,11 @@ func queuePlatform(en entry.Entry, gosDir string, platform platforms.Platform) e // Entry already posted platform? if oi.IsRegular(postedFile) { - _, _ = colour.Infoln("Not re-queueing", destPath, "as", postedFile, "already exists") + colour.Infoln("Not re-queueing", destPath, "as", postedFile, "already exists") return nil } - _, _ = colour.Infoln("Queuing", en.Path, "->", destPath) + colour.Infoln("Queuing", en.Path, "->", destPath) return oi.CopyFile(en.Path, destPath) } @@ -143,7 +143,7 @@ func deleteFiles(path, suffix string, olderThan time.Time) error { return err } if fileInfo.ModTime().Before(olderThan) { - _, _ = colour.Infoln("Cleaning up", filePath) + colour.Infoln("Cleaning up", filePath) err := os.Remove(filePath) if err != nil { return err |
