aboutsummaryrefslogtreecommitdiffhomepage
path: root/hst/fs.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-03-11 19:21:55 +0900
committerOphestra <cat@gensokyo.uk>2026-03-11 19:21:55 +0900
commit330a344845aa8653772a9be6c085f4fdb602a028 (patch)
tree7ed7f60ad70121be51289cbe9043c003d1940e19 /hst/fs.go
parent48cdf8bf852234ea3dad8dad3d571bb1d9546c32 (diff)
hst: improve doc comments
These now read a lot better both in source and on pkgsite. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'hst/fs.go')
-rw-r--r--hst/fs.go15
1 files changed, 10 insertions, 5 deletions
diff --git a/hst/fs.go b/hst/fs.go
index 3cecac88..3f0f6017 100644
--- a/hst/fs.go
+++ b/hst/fs.go
@@ -24,7 +24,8 @@ type FilesystemConfig interface {
fmt.Stringer
}
-// The Ops interface enables [FilesystemConfig] to queue container ops without depending on the container package.
+// The Ops interface enables [FilesystemConfig] to queue container ops without
+// depending on the container package.
type Ops interface {
// Tmpfs appends an op that mounts tmpfs on a container path.
Tmpfs(target *check.Absolute, size int, perm os.FileMode) Ops
@@ -41,12 +42,15 @@ type Ops interface {
// Link appends an op that creates a symlink in the container filesystem.
Link(target *check.Absolute, linkName string, dereference bool) Ops
- // Root appends an op that expands a directory into a toplevel bind mount mirror on container root.
+ // Root appends an op that expands a directory into a toplevel bind mount
+ // mirror on container root.
Root(host *check.Absolute, flags int) Ops
- // Etc appends an op that expands host /etc into a toplevel symlink mirror with /etc semantics.
+ // Etc appends an op that expands host /etc into a toplevel symlink mirror
+ // with /etc semantics.
Etc(host *check.Absolute, prefix string) Ops
- // Daemon appends an op that starts a daemon in the container and blocks until target appears.
+ // Daemon appends an op that starts a daemon in the container and blocks
+ // until target appears.
Daemon(target, path *check.Absolute, args ...string) Ops
}
@@ -61,7 +65,8 @@ type ApplyState struct {
// ErrFSNull is returned by [json] on encountering a null [FilesystemConfig] value.
var ErrFSNull = errors.New("unexpected null in mount point")
-// FSTypeError is returned when [ContainerConfig.Filesystem] contains an entry with invalid type.
+// FSTypeError is returned when [ContainerConfig.Filesystem] contains an entry
+// with invalid type.
type FSTypeError string
func (f FSTypeError) Error() string { return fmt.Sprintf("invalid filesystem type %q", string(f)) }