16 lines
207 B
Go
Raw Permalink Normal View History

2019-07-01 02:44:48 -06:00
// +build !windows
2019-07-04 01:36:35 -06:00
package manager
2019-07-01 02:44:48 -06:00
import "os/user"
func isPrivileged() bool {
u, err := user.Current()
if nil != err {
return false
}
// not quite, but close enough for now
return "0" == u.Uid
}