summaryrefslogtreecommitdiff
path: root/internal/askcli/command_list.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-03-27 07:18:04 +0200
committerPaul Buetow <paul@buetow.org>2026-03-27 07:18:04 +0200
commitd3586ad2b2b140435055c349393154ae7cfffaea (patch)
treede03bb45cb75b138d71f54b105e695672b7d802c /internal/askcli/command_list.go
parentf146fbc4cc25bcdeab19a0c1055c839776cebff4 (diff)
task 3a4c0f14-16ad-487f-af7c-bd99ee6464e6: use pointer Dispatcher receivers
Diffstat (limited to 'internal/askcli/command_list.go')
-rw-r--r--internal/askcli/command_list.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/askcli/command_list.go b/internal/askcli/command_list.go
index 2e5dfa2..76b5302 100644
--- a/internal/askcli/command_list.go
+++ b/internal/askcli/command_list.go
@@ -10,22 +10,22 @@ import (
"strings"
)
-func (d Dispatcher) handleList(ctx context.Context, args []string, stdout, stderr io.Writer) (int, error) {
+func (d *Dispatcher) handleList(ctx context.Context, args []string, stdout, stderr io.Writer) (int, error) {
return d.handleListWithFilters(ctx, []string{"status:pending"}, args[1:], stdout, stderr)
}
-func (d Dispatcher) handleAll(ctx context.Context, args []string, stdout, stderr io.Writer) (int, error) {
+func (d *Dispatcher) handleAll(ctx context.Context, args []string, stdout, stderr io.Writer) (int, error) {
return d.handleListWithFilters(ctx, nil, args[1:], stdout, stderr)
}
-func (d Dispatcher) handleReady(ctx context.Context, args []string, stdout, stderr io.Writer) (int, error) {
+func (d *Dispatcher) handleReady(ctx context.Context, args []string, stdout, stderr io.Writer) (int, error) {
return d.handleListWithFilters(ctx, []string{"+READY"}, args[1:], stdout, stderr)
}
// handleListWithFilters is the shared implementation for list/all/ready.
// initialFilters seeds the taskwarrior filter; extraArgs are user-supplied
// filter modifiers (limit:, sort:, +tag, started).
-func (d Dispatcher) handleListWithFilters(ctx context.Context, initialFilters, extraArgs []string, stdout, stderr io.Writer) (int, error) {
+func (d *Dispatcher) handleListWithFilters(ctx context.Context, initialFilters, extraArgs []string, stdout, stderr io.Writer) (int, error) {
filterArgs := append([]string(nil), initialFilters...)
for _, arg := range extraArgs {
if strings.HasPrefix(arg, "limit:") || strings.HasPrefix(arg, "sort:") ||