From 1b5ecd9eaf3289d164d8ed1bce6013e0e4ef8e86 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Thu, 3 Jul 2025 02:59:43 +0900 Subject: 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 --- container/output.go | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 container/output.go (limited to 'container/output.go') 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()) +} -- cgit v1.3.1