aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmd
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-09-30 00:21:26 +0900
committerOphestra <cat@gensokyo.uk>2025-09-30 00:21:26 +0900
commite58181a930064385c881b7ee1cac4914dd435121 (patch)
treef9ee955ebf054e8a1dcb8d8a3e623a47f0d5ab77 /cmd
parent71e70b7b5feb94aab5d99d9a3c2bea54537632c4 (diff)
internal/app/paths: defer extra formatting
This reduces payload size for params to shim. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/hakurei/command.go2
-rw-r--r--cmd/hakurei/parse.go2
-rw-r--r--cmd/hakurei/print.go2
3 files changed, 3 insertions, 3 deletions
diff --git a/cmd/hakurei/command.go b/cmd/hakurei/command.go
index b9da60be..ddd07bac 100644
--- a/cmd/hakurei/command.go
+++ b/cmd/hakurei/command.go
@@ -231,7 +231,7 @@ func buildCommand(ctx context.Context, msg container.Msg, early *earlyHardeningE
var flagShort bool
c.NewCommand("ps", "List active instances", func(args []string) error {
var sc hst.Paths
- app.CopyPaths(&sc, new(app.Hsu).MustID())
+ app.CopyPaths().Copy(&sc, new(app.Hsu).MustID())
printPs(os.Stdout, time.Now().UTC(), state.NewMulti(msg, sc.RunDirPath.String()), flagShort, flagJSON)
return errSuccess
}).Flag(&flagShort, "short", command.BoolFlag(false), "Print instance id")
diff --git a/cmd/hakurei/parse.go b/cmd/hakurei/parse.go
index eee7d323..14b9c167 100644
--- a/cmd/hakurei/parse.go
+++ b/cmd/hakurei/parse.go
@@ -89,7 +89,7 @@ func tryShort(msg container.Msg, name string) (config *hst.Config, entry *state.
msg.Verbose("argument looks like prefix")
var sc hst.Paths
- app.CopyPaths(&sc, new(app.Hsu).MustID())
+ app.CopyPaths().Copy(&sc, new(app.Hsu).MustID())
s := state.NewMulti(msg, sc.RunDirPath.String())
if entries, err := state.Join(s); err != nil {
log.Printf("cannot join store: %v", err)
diff --git a/cmd/hakurei/print.go b/cmd/hakurei/print.go
index 938517b8..eefe1345 100644
--- a/cmd/hakurei/print.go
+++ b/cmd/hakurei/print.go
@@ -22,7 +22,7 @@ func printShowSystem(output io.Writer, short, flagJSON bool) {
defer t.MustFlush()
info := &hst.Info{User: new(app.Hsu).MustID()}
- app.CopyPaths(&info.Paths, info.User)
+ app.CopyPaths().Copy(&info.Paths, info.User)
if flagJSON {
printJSON(output, short, info)