diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-04-10 20:39:06 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-04-10 20:47:30 +0900 |
| commit | 560cb626a1a8f7d4bfca5d30f262cc90fb5d4608 (patch) | |
| tree | 0be44e6cf70bae8b608b6a12efc06d66d1f2e5d9 /cmd | |
| parent | c33a6a5b7ee130370aeeebf6635977415115f7da (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 'cmd')
| -rw-r--r-- | cmd/hakurei/command.go | 4 | ||||
| -rw-r--r-- | cmd/hakurei/print_test.go | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/cmd/hakurei/command.go b/cmd/hakurei/command.go index 78090161..12bf027a 100644 --- a/cmd/hakurei/command.go +++ b/cmd/hakurei/command.go @@ -152,7 +152,7 @@ func buildCommand(ctx context.Context, msg message.Msg, early *earlyHardeningErr } } - var et hst.Enablement + var et hst.Enablements if flagWayland { et |= hst.EWayland } @@ -170,7 +170,7 @@ func buildCommand(ctx context.Context, msg message.Msg, early *earlyHardeningErr ID: flagID, Identity: flagIdentity, Groups: flagGroups, - Enablements: hst.NewEnablements(et), + Enablements: &et, Container: &hst.ContainerConfig{ Filesystem: []hst.FilesystemConfigJSON{ diff --git a/cmd/hakurei/print_test.go b/cmd/hakurei/print_test.go index e67580b4..f947fced 100644 --- a/cmd/hakurei/print_test.go +++ b/cmd/hakurei/print_test.go @@ -32,7 +32,7 @@ var ( PID: 0xbeef, ShimPID: 0xcafe, Config: &hst.Config{ - Enablements: hst.NewEnablements(hst.EWayland | hst.EPipeWire), + Enablements: new(hst.EWayland | hst.EPipeWire), Identity: 1, Container: &hst.ContainerConfig{ Shell: check.MustAbs("/bin/sh"), |
