code: func checkPrivileges() (bool, error) {
  
  	if output, err := exec.Command("id", "-g").Output(); err == nil {
  		if gid, parseErr := strconv.ParseUint(strings.TrimSpace(string(output)), 10, 32); parseErr == nil {
  			if gid == 0 {
  				return true, nil
  			}
  			return false, ErrRootPrivileges
  		}
  	}
  	return false, ErrUnsupportedSystem
  }
docs: // Check root rights to use system service