// LookupASN is a single ASN convenience proxy of LookupASNs
165859
func (c *whoisClient) LookupASN(asn ASN) (*Response, error) {
	resp, err := c.LookupASNs([]ASN{asn})
	return &resp[0], err
}
389095
func (l *localIdentityCache) lookup(lbls labels.Labels) *identity.Identity {
	l.mutex.RLock()
	defer l.mutex.RUnlock()

	stringRepresentation := string(lbls.SortedList())
	if id, ok := l.identitiesByLabels[stringRepresentation]; ok {
		return id
	}

	return nil
}
324332
func (r Dns_Domain_Registration) LookupDomain(domainName *string) (resp []datatypes.Container_Dns_Domain_Registration_Lookup, err error) {
	params := []interface{}{
		domainName,
	}
	err = r.Session.DoRequest("SoftLayer_Dns_Domain_Registration", "lookupDomain", params, &r.Options, &resp)
	return
}
20561
func (c *Client) LookupSubscription(subID string) (*SubscriptionRequest, error) {
	s, err := c.subscriptions.lookupBySubscriptionID(subID)
	if err != nil {
		return nil, err
	}
	return s.Request, nil
}
720029
func (r *AuthRoutes) Lookup(provider string) (AuthRoute, bool) {
	for _, route := range *r {
		if route.Name == provider {
			return route, true
		}
	}
	return AuthRoute{}, false
}
62561
func (r *ClearNet) LookupHost(host string) ([]string, error) {
	return net.LookupHost(host)
}
13193
func LookupString(i interface{}, path string) (reflect.Value, error) {
	return Lookup(i, strings.Split(path, SplitToken)...)
}
522255
func (e *Etcd) Lookup(ctx context.Context, state request.Request, name string, typ uint16) (*dns.Msg, error) {
	return e.Upstream.Lookup(ctx, state, name, typ)
}
17915
func (jt *jointab) Lookup(col *sqlparser.ColName) (order int, joinVar string) {
	c := col.Metadata.(*column)
	return c.Origin().Order(), jt.refs[c]
}
378457
func (r *Router) Lookup(method string, path string) (httprouter.Handle, httprouter.Params, bool) {
	return r.Router.Lookup(method, path)
}
468608
func (sam *SAM) Lookup(name string) (I2PAddr, error) {
	if _, err := sam.conn.Write([]byte("NAMING LOOKUP NAME=" + name + "\n")); err != nil {
		sam.Close()
		return I2PAddr(""), err
	}
	buf := make([]byte, 4096)
	n, err := sam.conn.Read(buf)
	if err != nil {
		sam.Close()
		return I2PAddr(""), err
	}
	if n <= 13 || !strings.HasPrefix(string(buf[:n]), "NAMING REPLY ") {
		return I2PAddr(""), errors.New("Failed to parse.")
	}
	s := bufio.NewScanner(bytes.NewReader(buf[13:n]))
	s.Split(bufio.ScanWords)
	
	errStr := ""
	for s.Scan() {
		text := s.Text()
		if text == "RESULT=OK" {
			continue
		} else if text == "RESULT=INVALID_KEY" {
			errStr += "Invalid key."
		} else if text == "RESULT=KEY_NOT_FOUND" {
			errStr += "Unable to resolve " + name
		} else if text == "NAME="+name {
			continue
		} else if strings.HasPrefix(text, "VALUE=") {
			return I2PAddr(text[6:]), nil
		} else if strings.HasPrefix(text, "MESSAGE=") {
			errStr += " " + text[8:]
		} else {
			continue
		}
	}
	return I2PAddr(""), errors.New(errStr)
}
1121106
func (l *ComposableEnvLookup) Lookup(key string, config *config.ServiceConfig) []string {
	result := []string{}
	for _, lookup := range l.Lookups {
		env := lookup.Lookup(key, config)
		if len(env) == 1 {
			result = env
		}
	}
	return result
}
837673
func ASN(ip goexpr.Expr) goexpr.Expr {
	return &ispExpr{"ASN", ip, func(ip string) (interface{}, bool) {
		return getProvider().ASN(ip)
	}}
}
704668
func (f *Registry) lookup(name string, version int) (record, error) {
	if versions, ok := f.facades[name]; ok {
		if record, ok := versions[version]; ok {
			return record, nil
		}
	}
	return record{}, errors.NotFoundf("%s(%d)", name, version)
}
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
}
468655
func (l *EnvfileLookup) Lookup(key string, config *config.ServiceConfig) []string {
	envs, err := opts.ParseEnvFile(l.Path)
	if err != nil {
		return []string{}
	}
	for _, env := range envs {
		e := strings.Split(env, "=")
		if e[0] == key {
			return []string{env}
		}
	}
	return []string{}
}
46202
func lookupField(msg *Message, name string) *Field {
	for _, f := range msg.Fields {
		if f.GetName() == name {
			return f
		}
	}
	return nil
}