summaryrefslogtreecommitdiff
path: root/internal/queue
diff options
context:
space:
mode:
Diffstat (limited to 'internal/queue')
-rw-r--r--internal/queue/queue.go4
-rw-r--r--internal/queue/sharetags_test.go4
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": {