aboutsummaryrefslogtreecommitdiffhomepage
path: root/hst/fsbind.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 /hst/fsbind.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 'hst/fsbind.go')
-rw-r--r--hst/fsbind.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/hst/fsbind.go b/hst/fsbind.go
index 3769fcd9..2cebf6b6 100644
--- a/hst/fsbind.go
+++ b/hst/fsbind.go
@@ -5,6 +5,7 @@ import (
"strings"
"hakurei.app/container"
+ "hakurei.app/container/check"
)
func init() { gob.Register(new(FSBind)) }
@@ -15,9 +16,9 @@ const FilesystemBind = "bind"
// FSBind represents a host to container bind mount.
type FSBind struct {
// mount point in container, same as Source if empty
- Target *container.Absolute `json:"dst,omitempty"`
+ Target *check.Absolute `json:"dst,omitempty"`
// host filesystem path to make available to the container
- Source *container.Absolute `json:"src"`
+ Source *check.Absolute `json:"src"`
// do not mount Target read-only
Write bool `json:"write,omitempty"`
// do not disable device files on Target, implies Write
@@ -66,7 +67,7 @@ func (b *FSBind) Valid() bool {
return true
}
-func (b *FSBind) Path() *container.Absolute {
+func (b *FSBind) Path() *check.Absolute {
if !b.Valid() {
return nil
}
@@ -76,11 +77,11 @@ func (b *FSBind) Path() *container.Absolute {
return b.Target
}
-func (b *FSBind) Host() []*container.Absolute {
+func (b *FSBind) Host() []*check.Absolute {
if !b.Valid() {
return nil
}
- return []*container.Absolute{b.Source}
+ return []*check.Absolute{b.Source}
}
func (b *FSBind) Apply(z *ApplyState) {