// ByGroups emits a token for each matching group in the rule's regex.
485752
func ByGroups(emitters ...Emitter) Emitter {
	return EmitterFunc(func(groups []string, lexer Lexer) Iterator {
		iterators := make([]Iterator, 0, len(groups)-1)
		// NOTE: If this panics, there is a mismatch with groups
		for i, group := range groups[1:] {
			iterators = append(iterators, emitters[i].Emit([]string{group}, lexer))
		}
		return Concaterator(iterators...)
	})
}
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
}
7769
func getGroups(secret *corev1.Secret) ([]string, error) {
	// always include the default group
	groups := sets.NewString(bootstrapapi.BootstrapDefaultGroup)

	// grab any extra groups and if there are none, return just the default
	extraGroupsString := getSecretString(secret, bootstrapapi.BootstrapTokenExtraGroupsKey)
	if extraGroupsString == "" {
		return groups.List(), nil
	}

	// validate the names of the extra groups
	for _, group := range strings.Split(extraGroupsString, ",") {
		if err := bootstraputil.ValidateBootstrapGroupName(group); err != nil {
			return nil, err
		}
		groups.Insert(group)
	}

	// return the result as a deduplicated, sorted list
	return groups.List(), nil
}
153475
func ParseGroups(resourceConfig cliflag.ConfigurationMap) ([]string, error) {
	groups := []string{}
	for key := range resourceConfig {
		if key == "api/all" {
			continue
		}
		tokens := strings.Split(key, "/")
		if len(tokens) != 2 && len(tokens) != 3 {
			return groups, fmt.Errorf("runtime-config invalid key %s", key)
		}
		groupVersionString := tokens[0] + "/" + tokens[1]
		groupVersion, err := schema.ParseGroupVersion(groupVersionString)
		if err != nil {
			return nil, fmt.Errorf("runtime-config invalid key %s", key)
		}
		groups = append(groups, groupVersion.Group)
	}

	return groups, nil
}
766722
func (s *AdminListGroupsForUserOutput) SetGroups(v []*GroupType) *AdminListGroupsForUserOutput {
	s.Groups = v
	return s
}
73960
func (sl *Slack) FindGroupByName(name string) (*Group, error) {
	return sl.FindGroup(func(group *Group) bool {
		return group.Name == name
	})
}
302935
func Groups(name string, groups ...Options) Options {
	return options{
		name:   name,
		groups: groups,
	}
}
1257543
func (s *UserService) GetGroups(username string) (*[]UserGroup, *Response, error) {
	apiEndpoint := fmt.Sprintf("/rest/api/2/user/groups?username=%s", username)
	req, err := s.client.NewRequest("GET", apiEndpoint, nil)
	if err != nil {
		return nil, nil, err
	}

	userGroups := new([]UserGroup)
	resp, err := s.client.Do(req, userGroups)
	if err != nil {
		return nil, resp, NewJiraError(resp, err)
	}
	return userGroups, resp, nil
}
469650
func (ip *Interpreter) userGroups(args []string) {
	items, err := ip.Backend.UserGroups(args[0])
	ip.groupResponder(items, err)
}
547031
func (cs *StreamManager) LockProtectedGroups(gs []Group) {
	for i := range gs {
		cs.LockProtectedGroup(&gs[i])
	}
}
1012936
func (inst *DenseInstances) AllAttributeGroups() map[string]AttributeGroup {
	ret := make(map[string]AttributeGroup)
	for a := range inst.agMap {
		ret[a] = inst.ags[inst.agMap[a]]
	}
	return ret
}
62504
func (s *ListSubscribedRuleGroupsOutput) SetRuleGroups(v []*SubscribedRuleGroupSummary) *ListSubscribedRuleGroupsOutput {
	s.RuleGroups = v
	return s
}
347147
func (api *Client) GetGroups(excludeArchived bool) ([]Group, error) {
	return api.GetGroupsContext(context.Background(), excludeArchived)
}
1118657
func newGroups(permstring string) groups {
	plusStrSlice := strings.Split(permstring, "|")
	lr := len(plusStrSlice)
	result := make(groups, lr, lr)
	for i, plusStr := range plusStrSlice {
		result[i] = newGroup(plusStr)
	}
	return result
}
535399
func (s *DescribeUserResponse) SetGroups(v []*string) *DescribeUserResponse {
	s.Groups = v
	return s
}
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
}
922920
func (groups *Groups) GetGroups() error {
	req, err := client.NewRequest(
		Config,
		"GET",
		"/papi/v1/groups",
		nil,
	)
	if err != nil {
		return err
	}

	res, err := client.Do(Config, req)
	if err != nil {
		return err
	}

	if client.IsError(res) {
		return client.NewAPIError(res)
	}

	if err = client.BodyJSON(res, groups); err != nil {
		return err
	}

	return nil
}