From d3586ad2b2b140435055c349393154ae7cfffaea Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 27 Mar 2026 07:18:04 +0200 Subject: task 3a4c0f14-16ad-487f-af7c-bd99ee6464e6: use pointer Dispatcher receivers --- internal/askcli/command_list.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'internal/askcli/command_list.go') 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:") || -- cgit v1.2.3