// Find finds the first occurrence of a Rule by matching
// the Name field. It returns nil if the rule was not found.
193596
func (qrs *Rules) Find(name string) (qr *Rule) {
	for _, qr = range qrs.rules {
		if qr.Name == name {
			return qr
		}
	}
	return nil
}
1324161
func (l *List) Find(v *Node) (e *Element) {
	if l.len == 0 {
		return nil
	}
	for e = l.Front(); e != nil && e.Value != v; e = e.Next() {
	}
	return
}
189729
func find(data []byte, start int, target rune) (index int) {
	index = bytes.IndexRune(data[start:], target)
	if index != -1 {
		return index + start
	}
	return index
}
198015
func (t *Tree) Find(key interface{}) interface{} {
	if key != nil && t.root != nil {
		d := &findData{key, t.compare}
		node := d.finder(t.root)
		if node != nil {
			return node.value
		}
	}

	return nil
}
979148
func (r RegexpRule) Find(subject string) (int, Rule) {
	if indices := r.Regexp.FindStringIndex(subject); indices == nil {
		return -1, nil
	} else {
		return indices[0], r
	}
}
477492
func (list *TransactionList) Find(id string) *Transaction {
	for _, item := range list.Data {
		if item.ID == id {
			return item
		}
	}

	return nil
}
210799
func (r Root) Find(args ...string) Root {
	temp, ok := findOnce(r.Pointer, args, false, false)
	if ok == false {
		if debug {
			panic("Element `" + args[0] + "` with attributes `" + strings.Join(args[1:], " ") + "` not found")
		}
		return Root{nil, "", errors.New("element `" + args[0] + "` with attributes `" + strings.Join(args[1:], " ") + "` not found")}
	}
	return Root{temp, temp.Data, nil}
}
945804
func (all *assetLruList) Find(v *assetLruListEntry) (alle *assetLruListElement) {
	if all.len == 0 {
		return nil
	}
	for alle = all.Front(); alle != nil && alle.Value != v; alle = alle.Next() {
	}
	return
}
1206171
func (v *VerbalExpression) Find(s string) *VerbalExpression {
	return v.add(`(?:` + quote(s) + `)`)
}
529655
func Find(array []interface{}, iterator ConditionIterator) interface{} {
	for index, data := range array {
		if iterator(data, index) {
			return data
		}
	}
	return nil
}
724661
func (sc *SetComprehension) Find(path Ref) (Value, error) {
	if len(path) == 0 {
		return sc, nil
	}
	return nil, fmt.Errorf("find: not found")
}
672309
func (s strings) Find(in []string, what string) int {
	for i, entry := range in {
		if entry == what {
			return i
		}
	}

	return -1
}
1171243
func find(name string) *cobra.Command {
	for _, cmd := range root.Command.Commands() {
		if cmd.Name() == name {
			return cmd
		}
	}
	return nil
}
863649
func (s *Store) Find(result interface{}, query *Query) error {
	return s.Bolt().View(func(tx *bolt.Tx) error {
		return s.TxFind(tx, result, query)
	})
}
312829
func (f *Finder) Find(ctx context.Context, resType, path string, dst interface{}) error {
	p := strings.Split(path, "/")
	flt := make([]property.Filter, len(p)-1)
	for i := 1; i < len(p); i++ {
		flt[i-1] = property.Filter{"name": p[i]}
	}
	objs := make(map[string]types.ObjectContent)
	err := f.descend(ctx, f.client.Client.ServiceContent.RootFolder, resType, flt, 0, objs)
	if err != nil {
		return err
	}
	objectContentToTypedArray(objs, dst)
	log.Printf("D! [inputs.vsphere] Find(%s, %s) returned %d objects", resType, path, len(objs))
	return nil
}
268032
func (bow *Browser) Find(expr string) *goquery.Selection {
	return bow.state.Dom.Find(expr)
}
1098481
func (list *BalanceList) Find(id string) *Balance {
	for _, item := range list.Data {
		if item.ID == id {
			return item
		}
	}

	return nil
}