From e45b591404ebb36fa7d71510e99fdecf668a85e7 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Thu, 31 Oct 2024 21:50:22 +0200 Subject: t.Parallel() can actually slow down the testa then the tests are very short-running --- internal/queue/queue.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/queue/queue.go') diff --git a/internal/queue/queue.go b/internal/queue/queue.go index a9f9319..59882cc 100644 --- a/internal/queue/queue.go +++ b/internal/queue/queue.go @@ -33,8 +33,8 @@ func Run(args config.Args) error { // Queue all *.txt into ./db/*.txt.STAMP.queued func queueEntries(args config.Args) error { + // TODO: Use find(...), but refactor with variadic args ch, err := oi.ReadDirCh(args.GosDir, func(file os.DirEntry) (string, bool) { - // TODO: Make all of those loops return an entry.Entry filePath := filepath.Join(args.GosDir, file.Name()) return filePath, slices.Contains(validExtensions, filepath.Ext(file.Name())) && file.Type().IsRegular() @@ -53,7 +53,7 @@ func queueEntries(args config.Args) error { if err != nil { return err } - // TODO Refactor + // TODO Refactor this prompting mechanism plus possible choices for DRY err = prompt.DoYouWantThis("Do you want to queue this content", content) switch { case errors.Is(err, prompt.ErrEditContent): -- cgit v1.2.3