mirror of
https://github.com/netbirdio/netbird.git
synced 2024-11-30 03:54:35 +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
|
||
|
}
|