diff --git a/user/userns/userns.go b/user/userns/userns.go index b225f18..069a9bb 100644 --- a/user/userns/userns.go +++ b/user/userns/userns.go @@ -1,4 +1,8 @@ package userns -// RunningInUserNS detects whether we are currently running in a user namespace. -var RunningInUserNS = runningInUserNS +// RunningInUserNS detects whether we are currently running in a Linux +// user namespace and memoizes the result. It returns false on non-Linux +// platforms. +func RunningInUserNS() bool { + return runningInUserNS() +}