// MutexGroups returns a map of Flag lists which contain mutually
// exclusive flags.
337108
func (fs *FlagSet) MutexGroups() map[string]MutexGroup {
	r := make(map[string]MutexGroup)
	for _, f := range fs.Flags {
		for _, mg := range f.MutexGroups {
			if len(mg) == 0 {
				continue
			}
			if _, ok := r[mg]; !ok {
				r[mg] = make(MutexGroup, 0)
			}
			r[mg] = append(r[mg], f)
		}
	}
	return r
}
1241335
func (s *netCls) ListCgroupProcesses(cgroupname string) ([]string, error) {

	_, err := os.Stat(filepath.Join(basePath, s.TriremePath, cgroupname))

	if os.IsNotExist(err) {
		return []string{}, fmt.Errorf("cgroup %s does not exist: %s", cgroupname, err)
	}

	data, err := ioutil.ReadFile(filepath.Join(basePath, s.TriremePath, cgroupname, "cgroup.procs"))
	if err != nil {
		return []string{}, fmt.Errorf("cannot read procs file: %s", err)
	}

	procs := []string{}

	for _, line := range strings.Split(string(data), "\n") {
		if len(line) > 0 {
			procs = append(procs, line)
		}
	}

	return procs, nil
}
337491
func getTokenGroups(t syscall.Token) (*winapi.Tokengroups, error) {
	i, e := getInfo(t, syscall.TokenGroups, 50)
	if e != nil {
		return nil, e
	}
	return (*winapi.Tokengroups)(i), nil
}
686947
func (p *parser) pushGroup() {
	p.group.next = p.stack
	p.alternation.next = p.group
	p.concatenation.next = p.alternation
	p.stack = p.concatenation
}
409133
func (e *LDAPInterface) ListGroups() ([]string, error) {
	searchRequest := e.groupQuery.LDAPQuery.NewSearchRequest(e.requiredGroupAttributes())
	groups, err := ldaputil.QueryForEntries(e.clientConfig, searchRequest)
	if err != nil {
		return nil, err
	}

	ldapGroupUIDs := []string{}
	for _, group := range groups {
		ldapGroupUID := ldaputil.GetAttributeValue(group, []string{e.groupQuery.QueryAttribute})
		if len(ldapGroupUID) == 0 {
			return nil, fmt.Errorf("unable to find LDAP group UID for %s", group)
		}
		e.cachedGroups[ldapGroupUID] = group
		ldapGroupUIDs = append(ldapGroupUIDs, ldapGroupUID)
	}
	return ldapGroupUIDs, nil
}
721999
func (mg MutexGroup) IsValid() bool {
	c := 0
	for _, flag := range mg {
		if flag.WasSpecified {
			c++
		}
	}
	return c <= 1 && (!mg.IsObligatory() || c == 1)
}
532895
func (cs *StreamManager) UnlockProtectedGroups(gs []Group) {
	for i := range gs { //For each top level group
		cs.UnlockProtectedGroup(&gs[i])
	}
}
129833
func (s *User) SetGroups(v []*string) *User {
	s.Groups = v
	return s
}
747124
func (e *ADLDAPInterface) ListGroups() ([]string, error) {
	if err := e.populateCache(); err != nil {
		return nil, err
	}

	return sets.StringKeySet(e.ldapGroupToLDAPMembers).List(), nil
}
847217
func (api *Client) UnarchiveGroup(group string) error {
	return api.UnarchiveGroupContext(context.Background(), group)
}
377572
func (b *Broker) ListGroups(request *ListGroupsRequest) (*ListGroupsResponse, error) {
	response := new(ListGroupsResponse)

	err := b.sendAndReceive(request, response)
	if err != nil {
		return nil, err
	}

	return response, nil
}
1321112
func (*HandlerT) MutexProfile(file string, nsec uint) error {
	runtime.SetMutexProfileFraction(1)
	time.Sleep(time.Duration(nsec) * time.Second)
	defer runtime.SetMutexProfileFraction(0)
	return writeProfile("mutex", file)
}
443359
func (db *RedisDB) ssetExists(key, member string) bool {
	ss := db.sortedsetKeys[key]
	_, ok := ss[member]
	return ok
}
469650
func (ip *Interpreter) userGroups(args []string) {
	items, err := ip.Backend.UserGroups(args[0])
	ip.groupResponder(items, err)
}
73385
func (s *IndicesStatsService) Groups(groups ...string) *IndicesStatsService {
	s.groups = append(s.groups, groups...)
	return s
}
983307
func (g *BuilderGroup) Groups() []*BuilderGroup {
	groups := []*BuilderGroup{}
	for child, parent := range g.builder.ring.GroupToGroup {
		if parent == g.index {
			groups = append(groups, g.builder.groups[child])
		}
	}
	return groups
}
1083193
func MakeLeveledRWMutex(level MutexLevel, rwLocker rwLocker) LeveledRWMutex {
	return LeveledRWMutex{
		level:    level,
		rwLocker: rwLocker,
	}
}