mirror of
https://github.com/netbirdio/netbird.git
synced 2024-11-23 08:33:45 +01:00
13 lines
150 B
Go
13 lines
150 B
Go
|
//go:build linux || darwin
|
||
|
|
||
|
package util
|
||
|
|
||
|
import (
|
||
|
"os"
|
||
|
)
|
||
|
|
||
|
// IsAdmin returns true if user is root
|
||
|
func IsAdmin() bool {
|
||
|
return os.Geteuid() == 0
|
||
|
}
|