mirror of
https://git.coolaj86.com/coolaj86/go-watchdog.git
synced 2025-12-28 15:18:39 +00:00
16 lines
204 B
Go
16 lines
204 B
Go
// +build !windows
|
|
|
|
package installer
|
|
|
|
import "os/user"
|
|
|
|
func IsAdmin() bool {
|
|
u, err := user.Current()
|
|
if nil != err {
|
|
return false
|
|
}
|
|
|
|
// not quite, but close enough for now
|
|
return "0" == u.Uid
|
|
}
|