diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-03-17 02:55:36 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-03-17 02:55:36 +0900 |
| commit | 24618ab9a1524e8b8986a9bf67667288e642fcf1 (patch) | |
| tree | b3f2a71a2c9bedf937d0fec00092ad9133cb3ec9 /seccomp/output.go | |
| parent | 9ce4706a0766880c072cccd2643d66f614a6a16b (diff) | |
sandbox: move out of internal
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'seccomp/output.go')
| -rw-r--r-- | seccomp/output.go | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/seccomp/output.go b/seccomp/output.go deleted file mode 100644 index d583c9ee..00000000 --- a/seccomp/output.go +++ /dev/null @@ -1,30 +0,0 @@ -package seccomp - -import "C" -import "sync/atomic" - -var printlnP atomic.Pointer[func(v ...any)] - -func SetOutput(f func(v ...any)) { - if f == nil { - // avoid storing nil function - printlnP.Store(nil) - } else { - printlnP.Store(&f) - } -} - -func GetOutput() func(v ...any) { - if fp := printlnP.Load(); fp == nil { - return nil - } else { - return *fp - } -} - -//export F_println -func F_println(v *C.char) { - if fp := printlnP.Load(); fp != nil { - (*fp)(C.GoString(v)) - } -} |
