// isTagged checks if a tag is in an array of tags.
325375
func isTagged(tag string, tags []string) bool {
	for _, t := range tags {
		if t == tag {
			return true
		}
	}
	return false
}
636305
func IsSigned(t querypb.Type) bool {
	return int(t)&(flagIsIntegral|flagIsUnsigned) == flagIsIntegral
}
1122991
func (f FieldMatchingFlags) IsSet(flag FieldMatchingFlags) bool {
	if flag == DestFromSource {
		// The bit logic doesn't work on the default value.
		return f&SourceToDest != SourceToDest
	}
	return f&flag == flag
}
287316
func (p *Project) IsStopped(containerID string) (bool, error) {
	return p.containerStatus(containerID, "stopped")
}
1012392
func tagIgnoredGeneric(k string) bool {
	filter := []string{"^aws:"}
	for _, v := range filter {
		log.Printf("[DEBUG] Matching %v with %v\n", v, k)
		r, _ := regexp.MatchString(v, k)
		if r {
			log.Printf("[DEBUG] Found AWS specific tag %s, ignoring.\n", k)
			return true
		}
	}
	return false
}
263050
func (d *Dataset) Tag(index int, tags ...string) error {
	if index < 0 || index >= d.rows {
		return ErrInvalidRowIndex
	}

	for _, tag := range tags {
		if !isTagged(tag, d.tags[index]) {
			d.tags[index] = append(d.tags[index], tag)
		}
	}

	return nil
}
357892
func tagIgnoredSSM(t *ssm.Tag) bool {
	filter := []string{"^aws:"}
	for _, v := range filter {
		log.Printf("[DEBUG] Matching %v with %v\n", v, *t.Key)
		r, _ := regexp.MatchString(v, *t.Key)
		if r {
			log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", *t.Key, *t.Value)
			return true
		}
	}
	return false
}
128817
func IsGranted(scope string, c echo.Context) bool {
	parts := strings.Split(scope, ":")
	switch parts[0] {
	case "profile_messages", "project_messages":
		return IsGranted("messages:"+parts[1], c)

	case "profile_comments":
		return IsGranted("profile_messages:"+parts[1], c)

	case "project_comments":
		return IsGranted("project_messages:"+parts[1], c)
	}

	scopes := c.Get("scopes").([]string)
	i := sort.SearchStrings(scopes, scope)
	if i < len(scopes) && scopes[i] == scope {
		return true
	}

	scope = "base:" + parts[1]
	i = sort.SearchStrings(scopes, scope)
	return i < len(scopes) && scopes[i] == scope
}
491403
func tagSetsMatch(a, b map[string]string) bool {
	if len(a) != len(b) {
		return false
	}

	for ak, av := range a {
		bv, ok := b[ak]
		if !ok {
			return false
		}
		if av != bv {
			return false
		}
	}

	return true
}
338877
func (m *MockScope) Tagged(tags map[string]string) metrics.Scope {
	ret := m.ctrl.Call(m, "Tagged", tags)
	ret0, _ := ret[0].(metrics.Scope)
	return ret0
}
698785
func (s *ProbabilisticSampler) IsSampled(id TraceID, operation string) (bool, []Tag) {
	return s.samplingBoundary >= id.Low, s.tags
}
1309325
func (b *bitmap) isMarked(addr uintptr) bool {
	block, baddr := b.block(addr)
	return block.isMarked(baddr)
}
19687
func IsTail(r rune) bool {
	if TAIL_G <= r && r <= TAIL_H {
		return true
	}
	return false
}
21018
func (s *StringFlag) IsSet() bool {
	if s != nil && s.string != nil {
		return true
	}
	return false
}
224654
func (s *stat) Tags() map[string]string {
	m := make(map[string]string, len(s.tags))
	for k, v := range s.tags {
		m[k] = v
	}
	return m
}
149433
func (server *Server) IsTaskRegistered(name string) bool {
	_, ok := server.registeredTasks[name]
	return ok
}
545288
func (set *TagKeysSet) IsSupersetKeys(other Tags) bool {
	keys := set.keys[set.i&1]
	i, j := 0, 0
	for i < len(keys) && j < len(other) {
		if cmp := bytes.Compare(keys[i], other[j].Key); cmp > 0 {
			return false
		} else if cmp == 0 {
			j++
		}
		i++
	}

	return j == len(other)
}