You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Package security contains OS specific mitigation mechanisms.
2
2
3
-
//go:build !openbsd
3
+
//go:build !openbsd && !unsafe
4
4
5
5
package security
6
6
7
+
import (
8
+
"fmt"
9
+
"runtime"
10
+
)
11
+
7
12
// IsHardened reports whether security sandbox is enabled.
8
13
constIsHardened=false
9
14
10
15
// Sandbox restrict access to system resources.
11
16
funcSandbox() error {
12
-
returnnil
17
+
returnfmt.Errorf("security sandbox is unavailable on %s/%s. To use app on this platform, compile it without sandbox (with 'unsafe' flag)", runtime.GOOS, runtime.GOARCH)
0 commit comments