diff options
| author | Paul Buetow <paul@buetow.org> | 2026-03-16 03:55:40 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-03-16 03:55:40 +0200 |
| commit | 35f1097f473e51be82f68e93ea2db48dd1c98519 (patch) | |
| tree | 1b0a316caa9bbbbfab20b6665b424f356f411ac2 /internal/hexaiaction/run_test.go | |
| parent | 93dfe3798e03e74766b229418cde364a5ef29ae9 (diff) | |
Fix mixed pointer/value receivers on appconfig.App
Change all value receivers on App to pointer receivers for consistency.
Update callers that pass App values to pass pointers where needed for
the actionConfig interface.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'internal/hexaiaction/run_test.go')
| -rw-r--r-- | internal/hexaiaction/run_test.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/hexaiaction/run_test.go b/internal/hexaiaction/run_test.go index adc3159..b927d57 100644 --- a/internal/hexaiaction/run_test.go +++ b/internal/hexaiaction/run_test.go @@ -19,7 +19,7 @@ func (f fakeDoer) DefaultModel() string { return "m" } func TestExecuteAction_Skip(t *testing.T) { cfg := appconfig.App{} parts := InputParts{Selection: "data"} - out, err := executeAction(context.Background(), ActionSkip, parts, cfg, fakeDoer{"IGN"}, nil, nil) + out, err := executeAction(context.Background(), ActionSkip, parts, &cfg, fakeDoer{"IGN"}, nil, nil) if err != nil || out != "data" { t.Fatalf("skip failed: %q %v", out, err) } @@ -32,19 +32,19 @@ func TestExecuteAction_Rewrite_Document_GoTest(t *testing.T) { // rewrite with inline instruction sel := ";change;\ncode" - out, err := executeAction(context.Background(), ActionRewrite, InputParts{Selection: sel}, cfg, client, nil, nil) + out, err := executeAction(context.Background(), ActionRewrite, InputParts{Selection: sel}, &cfg, client, nil, nil) if err != nil || strings.TrimSpace(out) != "DONE" { t.Fatalf("rewrite failed: %q %v", out, err) } // document - out, err = executeAction(context.Background(), ActionDocument, InputParts{Selection: "code"}, cfg, client, nil, nil) + out, err = executeAction(context.Background(), ActionDocument, InputParts{Selection: "code"}, &cfg, client, nil, nil) if err != nil || strings.TrimSpace(out) != "DONE" { t.Fatalf("document failed: %q %v", out, err) } // go test - out, err = executeAction(context.Background(), ActionGoTest, InputParts{Selection: "func A(){}"}, cfg, client, nil, nil) + out, err = executeAction(context.Background(), ActionGoTest, InputParts{Selection: "func A(){}"}, &cfg, client, nil, nil) if err != nil || strings.TrimSpace(out) != "DONE" { t.Fatalf("gotest failed: %q %v", out, err) } |
