// objectInterface is like object but returns map[string]interface{}.
193076
func (d *decodeState) objectInterface() (map[string]interface{}, error) {
	var err error
	m := make(map[string]interface{})
	for {
		// Read opening " of string key or closing }.
		op := d.scanWhile(scanSkipSpace)
		if op == scanEndObject {
			// closing } - can only happen on first iteration.
			break
		}
		if op != scanBeginLiteral {
			return nil, errPhase
		}

		// Read string key.
		start := d.off - 1
		op = d.scanWhile(scanContinue)
		item := d.data[start : d.off-1]
		key, ok := unquote(item)
		if !ok {
			return nil, errPhase
		}

		// Read : before value.
		if op == scanSkipSpace {
			op = d.scanWhile(scanSkipSpace)
		}
		if op != scanObjectKey {
			return nil, errPhase
		}

		// Read value.
		m[key], err = d.valueInterface()
		if err != nil {
			return nil, err
		}

		// Next token must be , or }.
		op = d.scanWhile(scanSkipSpace)
		if op == scanEndObject {
			break
		}
		if op != scanObjectValue {
			return nil, errPhase
		}
	}
	return m, nil
}
867889
func (c *Connection) Object(container string, objectName string) (info Object, headers Headers, err error) {
	err = withLORetry(0, func() (Headers, int64, error) {
		info, headers, err = c.objectBase(container, objectName)
		if err != nil {
			return headers, 0, err
		}
		return headers, info.Bytes, nil
	})
	return
}
907623
func (r *Lexer) Interface() interface{} {
	if r.token.kind == tokenUndef && r.Ok() {
		r.FetchToken()
	}

	if !r.Ok() {
		return nil
	}
	switch r.token.kind {
	case tokenString:
		return r.String()
	case tokenNumber:
		return r.Float64()
	case tokenBool:
		return r.Bool()
	case tokenNull:
		r.Null()
		return nil
	}

	if r.token.delimValue == '{' {
		r.consume()

		ret := map[string]interface{}{}
		for !r.IsDelim('}') {
			key := r.String()
			r.WantColon()
			ret[key] = r.Interface()
			r.WantComma()
		}
		r.Delim('}')

		if r.Ok() {
			return ret
		} else {
			return nil
		}
	} else if r.token.delimValue == '[' {
		r.consume()

		var ret []interface{}
		for !r.IsDelim(']') {
			ret = append(ret, r.Interface())
			r.WantComma()
		}
		r.Delim(']')

		if r.Ok() {
			return ret
		} else {
			return nil
		}
	}
	r.errSyntax()
	return nil
}
1201104
func GetInterfaces() (Interfaces, error) {
	interfaces, err := net.Interfaces()
	if err != nil {
		Logln("Can't get interfaces.", err)
		return nil, err
	}
	var ifaces Interfaces
	for _, iface := range interfaces {
		ifaces = append(ifaces, Interface(iface))
	}
	return ifaces, nil
}
1187037
func netInterfaces() ([]net.Interface, error) {
	validIfaces := []net.Interface{}
	ifaces, err := net.Interfaces()
	if err != nil {
		return nil, err
	}

	for _, iface := range ifaces {
		if !vethRegex.MatchString(iface.Name) && stringSlice(invalidIfaces).pos(iface.Name) == -1 {
			validIfaces = append(validIfaces, iface)
		}
	}

	return validIfaces, nil
}
630401
func (c *VPCRouterDHCPServerConfig) InterfaceIndex() int {
	strIndex := strings.Replace(c.Interface, "eth", "", -1)
	index, err := strconv.Atoi(strIndex)
	if err != nil {
		return -1
	}
	return index
}
755610
func (gi Instance) NetworkInterfaces() []compute.NetworkInterface {
	var results []compute.NetworkInterface
	// Copy to prevent callers from mutating the source data.
	for _, iface := range gi.InstanceSummary.NetworkInterfaces {
		results = append(results, *iface)
	}
	return results
}
939694
func (_PublicResolver *PublicResolverCaller) SupportsInterface(opts *bind.CallOpts, interfaceID [4]byte) (bool, error) {
	var (
		ret0 = new(bool)
	)
	out := ret0
	err := _PublicResolver.contract.Call(opts, out, "supportsInterface", interfaceID)
	return *ret0, err
}
986505
func RegistryToInterfaceMap(r metrics.Registry) map[string]interface{} {
	metricsMap := registryToMap(r)
	interfaceMap := make(map[string]interface{})
	for k, v := range metricsMap {
		interfaceMap[k] = v
	}
	return interfaceMap
}
1013676
func (e Encoder) AppendInterface(dst []byte, i interface{}) []byte {
	marshaled, err := json.Marshal(i)
	if err != nil {
		return e.AppendString(dst, fmt.Sprintf("marshaling error: %v", err))
	}
	return AppendEmbeddedJSON(dst, marshaled)
}
83424
func InterfaceOf(typ interface{}) reflect.Type {
	t := reflect.TypeOf(typ)

	if t.Kind() == reflect.Ptr {
		t = t.Elem()
	}

	if t.Kind() != reflect.Interface {
		panic("iface need to be an Interface. (*InterfaceType)(nil)")
	}
	return t
}
1349852
func StringsToInterfaces(strs ...string) []interface{} {
	ret := make([]interface{}, len(strs))
	for i := 0; i < len(strs); i++ {
		ret[i] = strs[i]
	}
	return ret
}
1187678
func (c *RedisCache) GetInterface(key string) (interface{}, bool) {
	item, ok := c.getGobItem(key)
	if !ok {
		return nil, false
	}

	return item.Value, true
}
9430
func (s *VPCRouterSetting) AddInterface(vip string, ipaddress []string, maskLen int) {
	if s.Interfaces == nil {
		s.Interfaces = []*VPCRouterInterface{nil}
	}
	s.Interfaces = append(s.Interfaces, &VPCRouterInterface{
		VirtualIPAddress: vip,
		IPAddress:        ipaddress,
		NetworkMaskLen:   maskLen,
	})
}
813114
func (c *CacheTTL) GetInterface(key string) (interface{}, bool) {
	c.itemsMu.RLock()
	defer c.itemsMu.RUnlock()

	if item, ok := c.items[key]; ok {
		if c.isValidItem(item) {
			return item.Value, true
		}
	}

	return nil, false
}
179876
func (_m *RequesterVariadic) OneInterface(a ...interface{}) bool {
	var _ca []interface{}
	_ca = append(_ca, a...)
	ret := _m.Called(_ca...)

	var r0 bool
	if rf, ok := ret.Get(0).(func(...interface{}) bool); ok {
		r0 = rf(a...)
	} else {
		r0 = ret.Get(0).(bool)
	}

	return r0
}
533211
func getInterfaceMap() (map[string]net.Interface, error) {
	interfaces, err := net.Interfaces()
	if err != nil {
		plog.WithError(err).Debug("Unable to read network interfaces")
		return nil, err
	}
	//make a  of all ipaddresses to interface
	ips := make(map[string]net.Interface)
	for _, iface := range interfaces {
		addrs, err := iface.Addrs()
		if err != nil {
			plog.WithField("interface", iface.Name).WithError(err).Debug("Unable to read interface addresses")
			return nil, err
		}
		for _, ip := range addrs {
			normalIP := strings.SplitN(ip.String(), "/", 2)[0]
			normalIP = strings.Trim(strings.ToLower(normalIP), " ")

			ips[normalIP] = iface
		}
	}
	return ips, nil
}