// lookupMu is held
184179
func lookupUserid(id int) string {
	parsedPasswd = true
	populateMap(uidName, nil, "/etc/passwd")
	return uidName[id]
}
56849
func Lookup(service string, entries chan<- *ServiceEntry) error {
	params := DefaultParams(service)
	params.Entries = entries
	return Query(params)
}
364593
func Lookup(args ...cty.Value) (cty.Value, error) {
	return LookupFunc.Call(args)
}
188147
func (s *UserService) Lookup(params *UserLookupParams) ([]User, *http.Response, error) {
	users := new([]User)
	apiError := new(APIError)
	resp, err := s.sling.New().Get("lookup.json").QueryStruct(params).Receive(users, apiError)
	return *users, resp, relevantError(err, *apiError)
}
345877
func Lookup(name string) (Contains, error) {
	languagesMu.RLock()
	lang, ok := languagesMu.cache[name]
	if ok {
		languagesMu.RUnlock()
		return lang, nil
	}
	langDef, ok := languagesMu.defs[name]
	languagesMu.RUnlock()
	if !ok {
		return Contains{}, errors.Wrap(ErrLanguageNotFound, name)
	}

	lang, err := parseLang(langDef.body)
	if err != nil {
		return Contains{}, errors.Wrapf(err, "failed to parse %s", name)
	}

	languagesMu.Lock()
	defer languagesMu.Unlock()

	languagesMu.cache[name] = lang
	return lang, nil
}
1080249
func (s *CombinedPrimitiveSlice) lookup(l interface{}) *PrimitiveListItem {
	val := fmt.Sprintf("%v", l)
	for _, i := range s.Items {
		if fmt.Sprintf("%v", i.Value) == val {
			return i
		}
	}
	return nil
}
359295
func (ms *SQLMsgStore) Lookup(seq uint64) (*pb.MsgProto, error) {
	ms.Lock()
	msg, err := ms.lookup(seq)
	ms.Unlock()
	return msg, err
}
568802
func Lookup(providerType string) ProviderCreator {
	providersMu.Lock()
	defer providersMu.Unlock()
	return providers[providerType]
}
922351
func (t *nfkcTrie) lookupValue(n uint32, b byte) uint16 {
	switch {
	case n < 90:
		return uint16(nfkcValues[n<<6+uint32(b)])
	default:
		n -= 90
		return uint16(nfkcSparse.lookup(n, b))
	}
}
616225
func (u *Upstream) Lookup(ctx context.Context, state request.Request, name string, typ uint16) (*dns.Msg, error) {
	server, ok := ctx.Value(dnsserver.Key{}).(*dnsserver.Server)
	if !ok {
		return nil, fmt.Errorf("no full server is running")
	}

	req := new(dns.Msg)
	req.SetQuestion(name, typ)

	nw := nonwriter.New(state.W)

	server.ServeDNS(ctx, nw, req)

	return nw.Msg, nil
}
982640
func (dd *DirData) Lookup(ctx context.Context, name string) (DirEntry, error) {
	topBlock, err := dd.GetTopBlock(ctx, BlockRead)
	if err != nil {
		return DirEntry{}, err
	}

	off := StringOffset(name)
	_, _, block, _, _, _, err := dd.tree.getBlockAtOffset(
		ctx, topBlock, &off, BlockLookup)
	if err != nil {
		return DirEntry{}, err
	}

	de, ok := block.(*DirBlock).Children[name]
	if !ok {
		return DirEntry{}, idutil.NoSuchNameError{Name: name}
	}
	return de, nil
}
585995
func (lkp *lookupInternal) Lookup(vcursor VCursor, ids []sqltypes.Value) ([]*sqltypes.Result, error) {
	results := make([]*sqltypes.Result, 0, len(ids))
	for _, id := range ids {
		bindVars := map[string]*querypb.BindVariable{
			lkp.FromColumns[0]: sqltypes.ValueBindVariable(id),
		}
		var err error
		var result *sqltypes.Result
		if lkp.Autocommit {
			result, err = vcursor.ExecuteAutocommit("VindexLookup", lkp.sel, bindVars, false /* isDML */)
		} else {
			result, err = vcursor.Execute("VindexLookup", lkp.sel, bindVars, false /* isDML */)
		}
		if err != nil {
			return nil, fmt.Errorf("lookup.Map: %v", err)
		}
		results = append(results, result)
	}
	return results, nil
}
51194
func (c *ConnectionManager) LookupConnection(i ConnectionID) rpc.Transporter {
	c.Lock()
	defer c.Unlock()
	if conn := c.lookup[i]; conn != nil {
		return conn.transporter
	}
	return nil
}
135000
func (t *Template) Lookup(name string) *Template {
	if t.common == nil {
		return nil
	}
	return t.tmpl[name]
}
62561
func (r *ClearNet) LookupHost(host string) ([]string, error) {
	return net.LookupHost(host)
}
422410
func (r *Root) Lookup(ctx context.Context, req *fuse.LookupRequest, resp *fuse.LookupResponse) (_ fs.Node, err error) {
	r.log().CDebugf(ctx, "FS Lookup %s", req.Name)
	defer func() { err = r.private.fs.processError(ctx, libkbfs.ReadMode, err) }()

	specialNode := handleNonTLFSpecialFile(
		req.Name, r.private.fs, &resp.EntryValid)
	if specialNode != nil {
		return specialNode, nil
	}

	platformNode, err := r.platformLookup(ctx, req, resp)
	if platformNode != nil || err != nil {
		return platformNode, err
	}

	switch req.Name {
	case PrivateName:
		return r.private, nil
	case PublicName:
		return r.public, nil
	}

	if req.Name == TeamName {
		return r.team, nil
	}

	// Don't want to pop up errors on special OS files.
	if strings.HasPrefix(req.Name, ".") {
		return nil, fuse.ENOENT
	}

	return nil, libkbfs.NoSuchFolderListError{
		Name:     req.Name,
		PrivName: PrivateName,
		PubName:  PublicName,
	}
}
1057207
func (ms *MemoryMsgStore) Lookup(seq uint64) (*pb.MsgProto, error) {
	ms.RLock()
	m := ms.msgs[seq]
	ms.RUnlock()
	return m, nil
}