diff options
| author | Paul Buetow <paul@buetow.org> | 2024-10-31 21:50:22 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2024-10-31 21:50:22 +0200 |
| commit | e45b591404ebb36fa7d71510e99fdecf668a85e7 (patch) | |
| tree | 9a0cd416adbc1ce02249b26e667d6c686f8933f3 /internal/queue | |
| parent | 38cff047850cd0d31d6ec23a9446a94855a93ba6 (diff) | |
t.Parallel() can actually slow down the testa then the tests are very short-running
Diffstat (limited to 'internal/queue')
| -rw-r--r-- | internal/queue/queue.go | 4 | ||||
| -rw-r--r-- | internal/queue/sharetags_test.go | 4 |
2 files changed, 2 insertions, 6 deletions
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): diff --git a/internal/queue/sharetags_test.go b/internal/queue/sharetags_test.go index 0b43d99..d13c79e 100644 --- a/internal/queue/sharetags_test.go +++ b/internal/queue/sharetags_test.go @@ -8,8 +8,6 @@ import ( ) func TestShareTagsPositive(t *testing.T) { - t.Parallel() - args := config.Args{Platforms: map[string]int{"mastodon": 100, "linkedin": 100}} testTable := map[string]shareTags{ "./foo/bar.without.tags.txt.20240101-010101.queued": { @@ -54,8 +52,6 @@ func TestShareTagsPositive(t *testing.T) { } } func TestShareTagsNegative(t *testing.T) { - t.Parallel() - args := config.Args{Platforms: map[string]int{"mastodon": 100, "linkedin": 100}} testTable := map[string]shareTags{ "./foo/bar.without.tags.txt.20240101-010101.queued": { |
