// Group creates a new sub-router with prefix.
505354
func (e *Echo) Group(prefix string, m ...interface{}) *Group {
	g, y := e.groups[prefix]
	if !y {
		g = &Group{prefix: prefix, echo: e}
		e.groups[prefix] = g
	}
	if len(m) > 0 {
		g.Use(m...)
	}
	return g
}
505662
func ConnsWithGroup(g Group, conns []*Conn) []*Conn {
	var out []*Conn
	for _, c := range conns {
		if c.InGroup(g) {
			out = append(out, c)
		}
	}
	return out
}
300620
func newRoute(path string, group *RouteGroup) *Route {
	path = group.prefix + path
	name := path

	// an asterisk at the end matches any number of characters
	if strings.HasSuffix(path, "*") {
		path = path[:len(path)-1] + "<:.*>"
	}

	route := &Route{
		group:    group,
		name:     name,
		path:     path,
		template: buildURLTemplate(path),
	}
	group.router.routes[name] = route

	return route
}
673129
func (i *IPAddressPerTask) AddGroup(group string) *IPAddressPerTask {
	if i.Groups == nil {
		i.EmptyGroups()
	}

	groups := *i.Groups
	groups = append(groups, group)
	i.Groups = &groups

	return i
}
939911
func (r *Router) Group(path string, handlers ...HandlerFunc) *Router {
	handlers = r.combineHandlers(handlers)
	return &Router{
		handlers: handlers,
		prefix:   r.path(path),
		ace:      r.ace,
	}
}
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
}
538062
func Group(prefix string, m ...interface{}) *echo.Group {
	return Default.Group(prefix, m...)
}
1054112
func (g *Generic) Group(provider *http.Client) (string, error) {
	res := map[string]interface{}{}

	r, err := provider.Get(g.APIURL)
	if err != nil {
		return "", err
	}

	defer r.Body.Close()
	if err = json.NewDecoder(r.Body).Decode(&res); err != nil {
		return "", err
	}

	email := ""
	value := res[g.APIKey]
	if e, ok := value.(string); ok {
		email = e
	}

	// If we did not receive an email address, try to lookup the email
	// in a similar way as github
	if email == "" {
		email, err = g.getPrimaryEmail(provider)
		if err != nil {
			return "", err
		}
	}

	domain := strings.Split(email, "@")
	if len(domain) != 2 {
		return "", fmt.Errorf("malformed email address, expected %q to contain @ symbol", email)
	}

	return domain[1], nil
}
1099118
func (g *Group) Group(p string, o interface{}) {
	gr := getGroup(o)
	for _, gchild := range gr.routers {
		g.Route(gchild.methods, joinRoute(p, gchild.url), gchild.c, append(gr.handlers, gchild.handlers...)...)
	}
}
1365632
func (g *Group) Group(prefix string, filters ...Filter) *Group {
	return g.server.Group(g.prefix+prefix, g.mergeFilters(filters)...)
}
939411
func (r *router) Group(path string) RouterGroup {
	return r.group.Group(path)
}
36535
func Group(group string) (*apimachinery.GroupMeta, error) {
	groupMeta, found := groupMetaMap[group]
	if !found {
		return nil, fmt.Errorf("group %v has not been registered", group)
	}
	groupMetaCopy := *groupMeta
	return &groupMetaCopy, nil
}
785786
func NewGroup(e *GroupExpr) *Group {
	g := &Group{
		Equivalents:  list.New(),
		Fingerprints: make(map[string]*list.Element),
		FirstExpr:    make(map[Operand]*list.Element),
		ImplMap:      make(map[string]Implementation),
	}
	g.Insert(e)
	return g
}
727896
func (r *marathonClient) CreateGroup(group *Group) error {
	return r.apiPost(marathonAPIGroups, group, nil)
}
780850
func (s *SVG) Group(elements [2]string, args map[string]interface{}) {
	s.svgString += fmt.Sprintf("<g %s>", s.WriteArgs(args))
	s.svgString += elements[0] + elements[1]
	s.svgString += "</g>"
}
1100994
func (p *pageState) Group(key interface{}, in interface{}) (interface{}, error) {
	pages, err := page.ToPages(in)
	if err != nil {
		return nil, err
	}
	return page.PageGroup{Key: key, Pages: pages}, nil
}
304576
func (g *Group) Add(method, path string, handler HandlerFunc, middleware ...MiddlewareFunc) *Route {
	// Combine into a new slice to avoid accidentally passing the same slice for
	// multiple routes, which would lead to later add() calls overwriting the
	// middleware from earlier calls.
	m := make([]MiddlewareFunc, 0, len(g.middleware)+len(middleware))
	m = append(m, g.middleware...)
	m = append(m, middleware...)
	return g.echo.add(g.host, method, g.prefix+path, handler, m...)
}