aboutsummaryrefslogtreecommitdiffhomepage
path: root/container/container.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-10-07 20:06:26 +0900
committerOphestra <cat@gensokyo.uk>2025-10-07 20:57:58 +0900
commit0e6c1a50260de141c50bb50fd3f2b2bcf9a3fe64 (patch)
treedfe9c40ceb8c1be8d2728a2db9017bffef174d3d /container/container.go
parentd23b4dc9e64d3f00e746c65f3038a1a6de44b8f5 (diff)
container/check: move absolute pathname
This allows use of absolute pathname values without importing container. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'container/container.go')
-rw-r--r--container/container.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/container/container.go b/container/container.go
index e54afb99..08dc9e45 100644
--- a/container/container.go
+++ b/container/container.go
@@ -15,6 +15,7 @@ import (
"time"
"hakurei.app/container/bits"
+ "hakurei.app/container/check"
"hakurei.app/container/seccomp"
)
@@ -57,11 +58,11 @@ type (
// Params holds container configuration and is safe to serialise.
Params struct {
// Working directory in the container.
- Dir *Absolute
+ Dir *check.Absolute
// Initial process environment.
Env []string
// Pathname of initial process in the container.
- Path *Absolute
+ Path *check.Absolute
// Initial process argv.
Args []string
// Deliver SIGINT to the initial process on context cancellation.
@@ -407,7 +408,7 @@ func New(ctx context.Context, msg Msg) *Container {
}
// NewCommand calls [New] and initialises the [Params.Path] and [Params.Args] fields.
-func NewCommand(ctx context.Context, msg Msg, pathname *Absolute, name string, args ...string) *Container {
+func NewCommand(ctx context.Context, msg Msg, pathname *check.Absolute, name string, args ...string) *Container {
z := New(ctx, msg)
z.Path = pathname
z.Args = append([]string{name}, args...)