aboutsummaryrefslogtreecommitdiffhomepage
path: root/container/output.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-07-03 02:59:43 +0900
committerOphestra <cat@gensokyo.uk>2025-07-03 02:59:43 +0900
commit1b5ecd9eaf3289d164d8ed1bce6013e0e4ef8e86 (patch)
tree047fe5fabdfb37d5c0088f7f572cebc8b13853bb /container/output.go
parent82561d62b66f17c05604e87f18187bb3a91f00d2 (diff)
container: move out of toplevel
This allows slightly easier use of the vanity url. This also provides some disambiguation between low level containers and hakurei app containers. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'container/output.go')
-rw-r--r--container/output.go26
1 files changed, 26 insertions, 0 deletions
diff --git a/container/output.go b/container/output.go
new file mode 100644
index 00000000..6bedd55b
--- /dev/null
+++ b/container/output.go
@@ -0,0 +1,26 @@
+package container
+
+var msg Msg = new(DefaultMsg)
+
+func GetOutput() Msg { return msg }
+func SetOutput(v Msg) {
+ if v == nil {
+ msg = new(DefaultMsg)
+ } else {
+ msg = v
+ }
+}
+
+func wrapErrSuffix(err error, a ...any) error {
+ if err == nil {
+ return nil
+ }
+ return msg.WrapErr(err, append(a, err)...)
+}
+
+func wrapErrSelf(err error) error {
+ if err == nil {
+ return nil
+ }
+ return msg.WrapErr(err, err.Error())
+}