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