diff options
| author | Paul Buetow <paul@buetow.org> | 2026-03-27 07:18:04 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-03-27 07:18:04 +0200 |
| commit | d3586ad2b2b140435055c349393154ae7cfffaea (patch) | |
| tree | de03bb45cb75b138d71f54b105e695672b7d802c /internal/askcli/dispatch.go | |
| parent | f146fbc4cc25bcdeab19a0c1055c839776cebff4 (diff) | |
task 3a4c0f14-16ad-487f-af7c-bd99ee6464e6: use pointer Dispatcher receivers
Diffstat (limited to 'internal/askcli/dispatch.go')
| -rw-r--r-- | internal/askcli/dispatch.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/askcli/dispatch.go b/internal/askcli/dispatch.go index 510f2cd..5160abb 100644 --- a/internal/askcli/dispatch.go +++ b/internal/askcli/dispatch.go @@ -23,7 +23,7 @@ func NewDispatcher(runner Runner) *Dispatcher { return &Dispatcher{runner: runner} } -func (d Dispatcher) Dispatch(ctx context.Context, args []string, stdin io.Reader, stdout, stderr io.Writer) (int, error) { +func (d *Dispatcher) Dispatch(ctx context.Context, args []string, stdin io.Reader, stdout, stderr io.Writer) (int, error) { // Extract --json flag before dispatching. var jsonOutput bool var filtered []string @@ -85,7 +85,7 @@ func (d Dispatcher) Dispatch(ctx context.Context, args []string, stdin io.Reader } } -func (d Dispatcher) help(w io.Writer) (int, error) { +func (d *Dispatcher) help(w io.Writer) (int, error) { io.WriteString(w, "ask - task management CLI\n") io.WriteString(w, "\nSubcommands:\n") io.WriteString(w, " ask add [mods...] [depends:<id|uuid>,...] <description...> Create a new task and print its ID\n") @@ -110,7 +110,7 @@ func (d Dispatcher) help(w io.Writer) (int, error) { return 0, nil } -func (d Dispatcher) unknownCommand(w io.Writer, subcommand string) (int, error) { +func (d *Dispatcher) unknownCommand(w io.Writer, subcommand string) (int, error) { fmt.Fprintf(w, "ask: unknown subcommand %q\n", subcommand) return 1, nil } |
