refactor: consolidate packages - move output to cmd, config/session to store, rename Store to GraphStore

This commit is contained in:
2026-04-02 00:18:33 +02:00
parent 2bcc310c6d
commit 03a896d23f
25 changed files with 190 additions and 239 deletions
+2 -7
View File
@@ -1,7 +1,6 @@
package cmd
import (
"axolotl/output"
"axolotl/service"
"fmt"
"os"
@@ -34,11 +33,7 @@ var editCmd = &cobra.Command{
tmp.Close()
defer os.Remove(tmp.Name())
editor := os.Getenv("EDITOR")
if editor == "" {
editor = "vi"
}
c := exec.Command(editor, tmp.Name())
c := exec.Command(cfg.GetEditor(), tmp.Name())
c.Stdin, c.Stdout, c.Stderr = os.Stdin, os.Stdout, os.Stderr
if err := c.Run(); err != nil {
fmt.Fprintln(os.Stderr, "editor failed:", err)
@@ -56,7 +51,7 @@ var editCmd = &cobra.Command{
fmt.Fprintln(os.Stderr, "failed to update:", err)
return
}
output.PrintNode(cmd.OutOrStdout(), svc, n, jsonFlag)
PrintNode(cmd.OutOrStdout(), svc, n, jsonFlag)
},
}