summaryrefslogtreecommitdiff
path: root/internal/queue/queue.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2024-10-27 18:19:13 +0200
committerPaul Buetow <paul@buetow.org>2024-10-27 18:19:13 +0200
commit10eb852c01e84619340290d1cbaba0b116dd3267 (patch)
treea0e1d8fe74f55c3f5854a2bc03c6ba0c745d448a /internal/queue/queue.go
parent3d8935e6456bcfe462bd7735615e9009ef5ff7c6 (diff)
add now tag
Diffstat (limited to 'internal/queue/queue.go')
-rw-r--r--internal/queue/queue.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/internal/queue/queue.go b/internal/queue/queue.go
index e396761..229c3c5 100644
--- a/internal/queue/queue.go
+++ b/internal/queue/queue.go
@@ -42,6 +42,7 @@ func queueEntries(args config.Args) error {
}
for filePath := range ch {
+ // TODO: Document .ask. in README.md
if strings.Contains(filepath.Base(filePath), ".ask.") {
bytes, err := os.ReadFile(filePath)
if err != nil {
@@ -61,8 +62,7 @@ func queueEntries(args config.Args) error {
return err
}
}
- destPath := fmt.Sprintf("%s/db/%s.%s.queued", args.GosDir,
- filepath.Base(filePath), timestamp.Now())
+ destPath := fmt.Sprintf("%s/db/%s.%s.queued", args.GosDir, filepath.Base(filePath), timestamp.Now())
if args.DryRun {
log.Println("Not queueing entry", filePath, "to", destPath, "as dry-run mode enabled")
continue
@@ -107,8 +107,7 @@ func queuePlatforms(args config.Args) error {
}
// Keep queued items in trash for a while.
- trashPath := filepath.Join(trashDir,
- strings.TrimSuffix(filepath.Base(filePath), ".queued")+".trash")
+ trashPath := filepath.Join(trashDir, strings.TrimSuffix(filepath.Base(filePath), ".queued")+".trash")
log.Printf("Trashing %s -> %s", filePath, trashPath)
if err := oi.EnsureParentDir(trashPath); err != nil {
return err