1
0
forked from rosa/hakurei

hst: support ephemeral overlay mounts

This is useful for reusing a readonly template without autoroot.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-06-17 02:16:57 +09:00
parent 28e133c298
commit 92b61889a6
6 changed files with 59 additions and 12 deletions
+6
View File
@@ -31,6 +31,8 @@ func (e AbsoluteError) Is(target error) bool {
type Absolute struct{ pathname unique.Handle[string] }
var (
_ fmt.GoStringer = new(Absolute)
_ encoding.TextAppender = new(Absolute)
_ encoding.TextMarshaler = new(Absolute)
_ encoding.TextUnmarshaler = new(Absolute)
@@ -40,6 +42,10 @@ var (
_ encoding.BinaryUnmarshaler = new(Absolute)
)
func (a *Absolute) GoString() string {
return fmt.Sprintf("check.MustAbs(%q)", a.String())
}
// ok returns whether [Absolute] is not the zero value.
func (a *Absolute) ok() bool { return a != nil && *a != (Absolute{}) }