aboutsummaryrefslogtreecommitdiffhomepage
path: root/container/init.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-08-29 01:12:02 +0900
committerOphestra <cat@gensokyo.uk>2025-08-29 01:12:02 +0900
commita462341a0a3e1132f3fcdb1efb0f7a56e851a9e1 (patch)
tree7780ebb8d871a306ebc4b8bb1205513689f2ebb6 /container/init.go
parent84ad9791e2f373d5869b2da6675c70f23deac8a0 (diff)
container: repeat and impossible state types
This moves repeated Op errors and impossible internal state errors off of msg. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'container/init.go')
-rw-r--r--container/init.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/container/init.go b/container/init.go
index a13a523b..8b0a7a26 100644
--- a/container/init.go
+++ b/container/init.go
@@ -68,6 +68,16 @@ const (
nrAutoRoot
)
+// OpRepeatError is returned applying a repeated nonrepeatable [Op].
+type OpRepeatError string
+
+func (e OpRepeatError) Error() string { return string(e) + " is not repeatable" }
+
+// OpStateError indicates an impossible internal state has been reached in an [Op].
+type OpStateError string
+
+func (o OpStateError) Error() string { return "impossible " + string(o) + " state reached" }
+
// initParams are params passed from parent.
type initParams struct {
Params