// matchProperty implements PhysicalPlan matchProperty interface.
2451
func (p *PhysicalUnionScan) matchProperty(prop *requiredProperty, childPlanInfo ...*physicalPlanInfo) *physicalPlanInfo {
	limit := prop.limit
	res := p.GetChildByIndex(0).(PhysicalPlan).matchProperty(convertLimitOffsetToCount(prop), childPlanInfo...)
	np := *p
	np.SetChildren(res.p)
	res.p = &np
	if limit != nil {
		res = addPlanToResponse(limit, res)
	}
	return res
}
332763
func matchPattern(pattern string) func(name string) bool {
	re := regexp.QuoteMeta(pattern)
	re = strings.Replace(re, `\.\.\.`, `.*`, -1)
	// Special case: foo/... matches foo too.
	if strings.HasSuffix(re, `/.*`) {
		re = re[:len(re)-len(`/.*`)] + `(/.*)?`
	}
	reg := regexp.MustCompile(`^` + re + `$`)
	return func(name string) bool {
		return reg.MatchString(name)
	}
}
557022
func podMatchesAllAffinityTermProperties(pod *v1.Pod, properties []*affinityTermProperties) bool {
	if len(properties) == 0 {
		return false
	}
	for _, property := range properties {
		if !priorityutil.PodMatchesTermsNamespaceAndSelector(pod, property.namespaces, property.selector) {
			return false
		}
	}
	return true
}
432207
func Match(methods []string, path string, h interface{}, m ...interface{}) {
	Default.Match(methods, path, h, m...)
}
1057930
func (p PathMatcher) Match(r *http.Request) bool {
	return Path(r.URL.Path).Matches(string(p))
}
633007
func (t *vhostTrie) matchHost(host string) *vhostTrie {
	// try exact match
	if subtree, ok := t.edges[host]; ok {
		return subtree
	}

	// then try replacing labels in the host
	// with wildcards until we get a match
	labels := strings.Split(host, ".")
	for i := range labels {
		labels[i] = "*"
		candidate := strings.Join(labels, ".")
		if subtree, ok := t.edges[candidate]; ok {
			return subtree
		}
	}

	return nil
}
1216439
func (indom *PCPInstanceDomain) MatchInstances(ins []string) bool {
	if len(ins) != len(indom.instances) {
		return false
	}

	for _, i := range ins {
		if _, ok := indom.instances[i]; !ok {
			return false
		}
	}

	return true
}
706681
func (o *ObjectConstraint) PatternPropertiesString(key string, c Constraint) *ObjectConstraint {
	rx := regexp.MustCompile(key)
	return o.PatternProperties(rx, c)
}
799900
func (dp *Datapoint) GetProperties() map[string]interface{} {
	m, ok := dp.Meta[tsProperty].(map[string]interface{})
	if !ok {
		return nil
	}
	return m
}
1095067
func MatchesMap(buf []byte, matchers matchers.Map) bool {
	return MatchMap(buf, matchers) != types.Unknown
}
1348537
func (p *parser) parseProperty() (string, error) {
	if p.charsRight() < 3 {
		return "", p.getErr(ErrIncompleteSlashP)
	}
	ch := p.moveRightGetChar()
	if ch != '{' {
		return "", p.getErr(ErrMalformedSlashP)
	}

	startpos := p.textpos()
	for p.charsRight() > 0 {
		ch = p.moveRightGetChar()
		if !(IsWordChar(ch) || ch == '-') {
			p.moveLeft()
			break
		}
	}
	capname := string(p.pattern[startpos:p.textpos()])

	if p.charsRight() == 0 || p.moveRightGetChar() != '}' {
		return "", p.getErr(ErrIncompleteSlashP)
	}

	if !isValidUnicodeCat(capname) {
		return "", p.getErr(ErrUnknownSlashP, capname)
	}

	return capname, nil
}
1137875
func GetMatch(c C) Match {
	if c.Env == nil {
		return Match{}
	}
	mi, ok := c.Env[MatchKey]
	if !ok {
		return Match{}
	}
	if m, ok := mi.(Match); ok {
		return m
	}
	return Match{}
}
170886
func Match(pattern, name string) (bool, error) {
	return defaultGlobber.Match(pattern, name)
}
338137
func (p *Selection) matchProperty(prop *requiredProperty, childPlanInfo ...*physicalPlanInfo) *physicalPlanInfo {
	if p.onTable {
		res := p.GetChildByIndex(0).(PhysicalPlan).matchProperty(prop, childPlanInfo...)
		sel := *p
		sel.SetChildren(res.p)
		res.p = &sel
		res.count = uint64(float64(res.count) * selectionFactor)
		return res
	}
	np := *p
	np.SetChildren(childPlanInfo[0].p)
	count := uint64(float64(childPlanInfo[0].count) * selectionFactor)
	return &physicalPlanInfo{p: &np, cost: childPlanInfo[0].cost, count: count}
}
1064269
func (fc *FeatureCollection) FillProperties() {
	properties := make(map[string]bool)

	// Loop 1: construct a set (actually a map)
	for _, feature := range fc.Features {
		for key := range feature.Properties {
			if _, ok := properties[key]; !ok {
				properties[key] = true
			}
		}
	}

	// Loop 2: make sure each feature has each property from the set
	for _, feature := range fc.Features {
		for key := range properties {
			if _, ok := feature.Properties[key]; !ok {
				feature.Properties[key] = nil
			}
		}
	}
}
244957
func (r *Request) MatchParams(params map[string]string) *Request {
	query := r.URLStruct.Query()
	for key, value := range params {
		query.Set(key, value)
	}
	r.URLStruct.RawQuery = query.Encode()
	return r
}
712225
func (m MatcherFunc) Match(r *http.Request, match *RouteMatch) bool {
	return m(r, match)
}