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