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