diff options
| author | Paul Buetow <paul@buetow.org> | 2024-10-10 10:34:26 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2024-10-10 10:34:26 +0300 |
| commit | 2f006df7a6aff97bb69bb2b6ffd607890863ebf9 (patch) | |
| tree | ecbe059b685d94cafb0b6e0e3b01b1d5bb36bd44 /internal/queue/queue.go | |
| parent | be3abe2462bca511ede21cacd1e5a3690b5aa745 (diff) | |
initial timestamp package
Diffstat (limited to 'internal/queue/queue.go')
| -rw-r--r-- | internal/queue/queue.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/internal/queue/queue.go b/internal/queue/queue.go index 98a30ac..fcef897 100644 --- a/internal/queue/queue.go +++ b/internal/queue/queue.go @@ -7,11 +7,10 @@ import ( "path/filepath" "slices" "strings" - "time" "codeberg.org/snonux/gos/internal/config" - "codeberg.org/snonux/gos/internal/format" "codeberg.org/snonux/gos/internal/oi" + "codeberg.org/snonux/gos/internal/timestamp" ) // Strictly, we only operate on .txt files, but we also accept .md as Obsidian creates only .md files. @@ -38,10 +37,9 @@ func queueEntries(args config.Args) error { return err } - now := time.Now() for filePath := range ch { destPath := fmt.Sprintf("%s/db/%s.%s.queued", args.GosDir, - filepath.Base(filePath), now.Format(format.Time)) + filepath.Base(filePath), timestamp.Now()) if args.DryRun { log.Println("Not queueing entry", filePath, "to", destPath, "as dry-run mode enabled") continue |
