aboutsummaryrefslogtreecommitdiffhomepage
path: root/hst/fs.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-08-14 21:36:22 +0900
committerOphestra <cat@gensokyo.uk>2025-08-14 21:36:22 +0900
commit0e543a58b36d4ab5d61c02ce93cf72bf2f218857 (patch)
treeae36b0a71c8c8e0275f72dd2f1593fd7cfa33d8f /hst/fs.go
parentc989e7785aa1ca5bf94aef5e096c86ae9af345df (diff)
hst/fs: valid method on underlying interface
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'hst/fs.go')
-rw-r--r--hst/fs.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/hst/fs.go b/hst/fs.go
index f60ca32f..ceb0aa4d 100644
--- a/hst/fs.go
+++ b/hst/fs.go
@@ -13,6 +13,8 @@ import (
type FilesystemConfig interface {
// Type returns the type of this mount point.
Type() string
+ // Valid returns whether the configuration is valid.
+ Valid() bool
// Target returns the pathname of the mount point in the container.
Target() *container.Absolute
// Host returns a slice of all host paths used by this mount point.
@@ -60,7 +62,9 @@ type FilesystemConfigJSON struct {
}
// Valid returns whether the [FilesystemConfigJSON] is valid.
-func (f *FilesystemConfigJSON) Valid() bool { return f != nil && f.FilesystemConfig != nil }
+func (f *FilesystemConfigJSON) Valid() bool {
+ return f != nil && f.FilesystemConfig != nil && f.FilesystemConfig.Valid()
+}
func (f *FilesystemConfigJSON) MarshalJSON() ([]byte, error) {
if f == nil || f.FilesystemConfig == nil {