diff options
| author | Paul Buetow <paul@buetow.org> | 2026-03-02 10:56:42 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-03-02 10:56:42 +0200 |
| commit | b636b12566ea6c2862bf3adc6686c57e0d785ca3 (patch) | |
| tree | 5c94a13179bf4a6bba5616f8bbd74ec8d61e4d0c /internal/cli | |
| parent | 88f6ca2fb24973b78afe76f82ea86171e40fccff (diff) | |
store: make Data carry injected deps (task 402)
Diffstat (limited to 'internal/cli')
| -rw-r--r-- | internal/cli/cli.go | 12 | ||||
| -rw-r--r-- | internal/cli/cli_test.go | 11 |
2 files changed, 10 insertions, 13 deletions
diff --git a/internal/cli/cli.go b/internal/cli/cli.go index b6d47fc..7b18c34 100644 --- a/internal/cli/cli.go +++ b/internal/cli/cli.go @@ -55,7 +55,6 @@ type CLI struct { g *git.Git clip *clipboard.Clipboard sh *shell.Shell - cipher *crypto.Cipher lastResult string // most recent search result description } @@ -101,11 +100,10 @@ func newCLI(ctx context.Context) (*CLI, error) { clip := clipboard.New(cfg.GnomeClipboardCmd, cfg.MacOSClipboardCmd) c := &CLI{ - cfg: &cfg, - st: st, - g: g, - clip: clip, - cipher: ciph, + cfg: &cfg, + st: st, + g: g, + clip: clip, } // Create the shell with a completion function that references the CLI. @@ -577,7 +575,7 @@ func (c *CLI) makeActionFn(ctx context.Context, action store.Action) func(contex if err := externalEdit(ctx, c.cfg.ExportDir, c.cfg.EditCmd, exportName); err != nil { return err } - return d.ReimportAfterExport(ctx, c.cipher, c.g) + return d.ReimportAfterExport(ctx) } default: diff --git a/internal/cli/cli_test.go b/internal/cli/cli_test.go index 39c79aa..9ff0510 100644 --- a/internal/cli/cli_test.go +++ b/internal/cli/cli_test.go @@ -62,12 +62,11 @@ func testCLI(t *testing.T) (*CLI, *config.Config) { t.Cleanup(func() { sh.Close() }) return &CLI{ - cfg: cfg, - st: st, - g: g, - clip: clipboard.New("", ""), - sh: sh, - cipher: ciph, + cfg: cfg, + st: st, + g: g, + clip: clipboard.New("", ""), + sh: sh, }, cfg } |
