hakurei/system/output.go
Ophestra feef2a0495
All checks were successful
Test / Create distribution (push) Successful in 24s
Test / Fortify (push) Successful in 2m33s
Test / Fpkg (push) Successful in 3m27s
Test / Data race detector (push) Successful in 4m2s
Test / Flake checks (push) Successful in 53s
sandbox: wrap fmsg interface
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-17 02:36:26 +09:00

21 lines
355 B
Go

package system
import "git.gensokyo.uk/security/fortify/internal/sandbox"
var msg sandbox.Msg = new(sandbox.DefaultMsg)
func SetOutput(v sandbox.Msg) {
if v == nil {
msg = new(sandbox.DefaultMsg)
} else {
msg = v
}
}
func wrapErrSuffix(err error, a ...any) error {
if err == nil {
return nil
}
return msg.WrapErr(err, append(a, err)...)
}