aboutsummaryrefslogtreecommitdiffhomepage
path: root/hst
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-06-17 01:29:47 +0900
committerOphestra <cat@gensokyo.uk>2026-06-17 01:50:53 +0900
commit323dcb282082f1aa6cc66a9100be0fadb077714c (patch)
tree16896bb84c470a0fb370d6e7eee22888a08b164c /hst
parentf46a0370a723f3920fc3be5edc8ca630d9039dc5 (diff)
cmd/app: high-level app configuration syntax
This replaces the nixos module. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'hst')
-rw-r--r--hst/container.go5
-rw-r--r--hst/dbus.go5
2 files changed, 10 insertions, 0 deletions
diff --git a/hst/container.go b/hst/container.go
index 15a5d221..f985f393 100644
--- a/hst/container.go
+++ b/hst/container.go
@@ -2,6 +2,7 @@ package hst
import (
"encoding/json"
+ "fmt"
"strings"
"syscall"
"time"
@@ -161,6 +162,10 @@ type ContainerConfig struct {
Flags Flags `json:"-"`
}
+func (c *ContainerConfig) GoString() string {
+ return fmt.Sprintf("&%#v", *c)
+}
+
// ContainerConfigF is [ContainerConfig] stripped of its methods.
//
// The [ContainerConfig.Flags] field does not survive a [json] round trip.
diff --git a/hst/dbus.go b/hst/dbus.go
index 5c4620cc..7b8a3585 100644
--- a/hst/dbus.go
+++ b/hst/dbus.go
@@ -1,6 +1,7 @@
package hst
import (
+ "fmt"
"strconv"
"strings"
)
@@ -61,6 +62,10 @@ type BusConfig struct {
Filter bool `json:"filter"`
}
+func (c *BusConfig) GoString() string {
+ return fmt.Sprintf("&%#v", *c)
+}
+
// Interfaces iterates over all interface strings specified in [BusConfig].
func (c *BusConfig) Interfaces(yield func(string) bool) {
if c == nil {