code: func IsGroupMember(gid int) (bool, error) {
  	groups, err := os.Getgroups()
  	if err != nil {
  		return false, trace.ConvertSystemError(err)
  	}
  	for _, group := range groups {
  		if group == gid {
  			return true, nil
  		}
  	}
  	return false, nil
  }
docs: // IsGroupMember returns whether currently logged user is a member of a group