aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/outcome
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-04-10 20:39:06 +0900
committerOphestra <cat@gensokyo.uk>2026-04-10 20:47:30 +0900
commit560cb626a1a8f7d4bfca5d30f262cc90fb5d4608 (patch)
tree0be44e6cf70bae8b608b6a12efc06d66d1f2e5d9 /internal/outcome
parentc33a6a5b7ee130370aeeebf6635977415115f7da (diff)
hst: remove enablement json adapter
The go116 behaviour of built-in new function makes this cleaner. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/outcome')
-rw-r--r--internal/outcome/outcome.go2
-rw-r--r--internal/outcome/process.go4
-rw-r--r--internal/outcome/run_test.go4
-rw-r--r--internal/outcome/sppulse_test.go2
4 files changed, 6 insertions, 6 deletions
diff --git a/internal/outcome/outcome.go b/internal/outcome/outcome.go
index 98ad718a..4bdc2ede 100644
--- a/internal/outcome/outcome.go
+++ b/internal/outcome/outcome.go
@@ -194,7 +194,7 @@ type outcomeStateSys struct {
// Copied from [hst.Config]. Safe for read by outcomeOp.toSystem.
appId string
// Copied from [hst.Config]. Safe for read by outcomeOp.toSystem.
- et hst.Enablement
+ et hst.Enablements
// Copied from [hst.Config]. Safe for read by spWaylandOp.toSystem only.
directWayland bool
diff --git a/internal/outcome/process.go b/internal/outcome/process.go
index 44a62463..67851edc 100644
--- a/internal/outcome/process.go
+++ b/internal/outcome/process.go
@@ -297,12 +297,12 @@ func (k *outcome) main(msg message.Msg, identifierFd int) {
// accumulate enablements of remaining instances
var (
// alive enablement bits
- rt hst.Enablement
+ rt hst.Enablements
// alive instance count
n int
)
for eh := range entries {
- var et hst.Enablement
+ var et hst.Enablements
if et, err = eh.Load(nil); err != nil {
perror(err, "read state header of instance "+eh.ID.String())
} else {
diff --git a/internal/outcome/run_test.go b/internal/outcome/run_test.go
index 73219bbe..77738641 100644
--- a/internal/outcome/run_test.go
+++ b/internal/outcome/run_test.go
@@ -288,7 +288,7 @@ func TestOutcomeRun(t *testing.T) {
},
Filter: true,
},
- Enablements: hst.NewEnablements(hst.EWayland | hst.EDBus | hst.EPipeWire | hst.EPulse),
+ Enablements: new(hst.EWayland | hst.EDBus | hst.EPipeWire | hst.EPulse),
Container: &hst.ContainerConfig{
Filesystem: []hst.FilesystemConfigJSON{
@@ -427,7 +427,7 @@ func TestOutcomeRun(t *testing.T) {
DirectPipeWire: true,
ID: "org.chromium.Chromium",
- Enablements: hst.NewEnablements(hst.EWayland | hst.EDBus | hst.EPipeWire | hst.EPulse),
+ Enablements: new(hst.EWayland | hst.EDBus | hst.EPipeWire | hst.EPulse),
Container: &hst.ContainerConfig{
Env: nil,
Filesystem: []hst.FilesystemConfigJSON{
diff --git a/internal/outcome/sppulse_test.go b/internal/outcome/sppulse_test.go
index f1abccaa..a1ff0d03 100644
--- a/internal/outcome/sppulse_test.go
+++ b/internal/outcome/sppulse_test.go
@@ -21,7 +21,7 @@ func TestSpPulseOp(t *testing.T) {
newConfig := func() *hst.Config {
config := hst.Template()
config.DirectPulse = true
- config.Enablements = hst.NewEnablements(hst.EPulse)
+ config.Enablements = new(hst.EPulse)
return config
}