// GetUintKey retrieves an element from the map under given integer key.
7031
func (m *HashMap) GetUintKey(key uintptr) (value interface{}, ok bool) {
	// inline getUintptrHash()
	bh := reflect.SliceHeader{
		Data: uintptr(unsafe.Pointer(&key)),
		Len:  intSizeBytes,
		Cap:  intSizeBytes,
	}
	buf := *(*[]byte)(unsafe.Pointer(&bh))
	h := uintptr(siphash.Hash(sipHashKey1, sipHashKey2, buf))

	data, element := m.indexElement(h)
	if data == nil {
		return nil, false
	}

	// inline HashMap.searchItem()
	for element != nil {
		if element.keyHash == h && element.key == key {
			return element.Value(), true
		}

		if element.keyHash > h {
			return nil, false
		}

		element = element.Next()
	}
	return nil, false
}
664611
func getKey(s, key string) string {
	i := strings.Index(s, key)
	if i == -1 {
		return ""
	}
	if i+len(key)+1 >= len(s) || s[i+len(key)] != '=' {
		return ""
	}
	j := strings.Index(s, ",")
	if j == -1 {
		j = len(s)
	}
	return s[i+len(key)+1 : j]
}
779006
func (r *Store) GetUint32Default(key string, def uint32) uint32 {
	if v, err := r.GetUint32(key); err == nil {
		return v
	}

	return def
}
983010
func (m *Manager) GetUint(key string) uint {
	return cast.ToUint(m.Get(key))
}
1112138
func (b *FastLogStore) GetUint64(key []byte) (uint64, error) {
	val, err := b.Get(key)
	if err != nil {
		return 0, err
	}
	if len(val) != 8 {
		return 0, errors.New("invalid number")
	}
	return binary.LittleEndian.Uint64(val), nil
}
197458
func (r *raftLog) GetUint64(k []byte) (uint64, error) {
	var v uint64
	vbytes, err := r.Get(k)
	if err == nil {
		v = binary.BigEndian.Uint64(vbytes)
	}
	return v, err
}
637294
func (s Slice) GetUInt() (uint64, error) {
	h := s.head()

	if h == 0x28 {
		// single byte integer
		return uint64(s[1]), nil
	}

	if h >= 0x29 && h <= 0x2f {
		// UInt
		return readIntegerNonEmpty(s[1:], uint(h)-0x27), nil
	}

	if h >= 0x20 && h <= 0x27 {
		// Int
		v, err := s.GetInt()
		if err != nil {
			return 0, WithStack(err)
		}
		if v < 0 {
			return 0, WithStack(NumberOutOfRangeError)
		}
		return uint64(v), nil
	}

	if h >= 0x30 && h <= 0x39 {
		// Smallint >= 0
		return uint64(h - 0x30), nil
	}

	if h >= 0x3a && h <= 0x3f {
		// Smallint < 0
		return 0, WithStack(NumberOutOfRangeError)
	}

	return 0, WithStack(InvalidTypeError{"Expecting type UInt"})
}
537561
func (e *GameEvent) GetUint64(name string) (uint64, error) {
	// Get the key from the message
	k, err := e.getEventKey(name)
	if err != nil {
		return 0, err
	}

	// Make sure it's a uint64.
	if k.GetType() != gameEventTypeUint64 {
		return 0, _errorf("field %s: expected uint64, got %s", name, gameEventTypeNames[k.GetType()])
	}

	return k.GetValUint64(), nil
}
950951
func (s StringStringMap) GetUint64(key string) (uint64, error) {
	return s.getUint64(key, false)
}
652935
func (c *Context) GetInt64(key string) (i64 int64) {
	if val, ok := c.Get(key); ok && val != nil {
		i64, _ = val.(int64)
	}
	return
}
239970
func (context *BaseContext) GetUInt(
	key string, defaultValue ...uint) uint {
	if value, ok := context.userData[key]; ok {
		if value, ok := value.(uint); ok {
			return value
		}
	}
	if len(defaultValue) > 0 {
		return defaultValue[0]
	}
	return 0
}
1169078
func (e *Entity) GetUint64(name string) (uint64, bool) {
	x, ok := e.Get(name).(uint64)
	return x, ok
}
890
func (e *Entity) GetUint32(name string) (uint32, bool) {
	if v := e.Get(name); v != nil {
		switch x := v.(type) {
		case uint32:
			return x, true
		case uint64:
			return uint32(x), true
		}
	}
	return 0, false
}
694673
func (c *Config) GetInt64(key string) (i int64, err error) {
	val, ok := (*c)[key]
	if !ok {
		return 0, ErrNoSuchKey
	}
	switch val.(type) {
	case int8:
		return int64(val.(int8)), nil
	case int16:
		return int64(val.(int16)), nil
	case int:
		return int64(val.(int)), nil
	case int32:
		return int64(val.(int32)), nil
	case int64:
		return val.(int64), nil
	case float64:
		// json loads float64 so handle that case
		return int64(val.(float64)), nil
	default:
		return 0, fmt.Errorf("Wrong type for %s (Type:%T Expecting:%T)", key, val, i)
	}
}
1054280
func GetKey(b []byte) Key {
	for _, k := range ASCIISequences {
		if bytes.Equal(k.ASCIICode, b) {
			return k.Key
		}
	}
	return NotDefined
}
1297740
func (cache *Cache) GetInt(key int64) (value []byte, err error) {
	var bKey [8]byte
	binary.LittleEndian.PutUint64(bKey[:], uint64(key))
	return cache.Get(bKey[:])
}
1332246
func (e Enum) GetKey(value interface{}) string {
	for k, v := range e {
		if reflect.DeepEqual(v, value) {
			return k
		}
	}
	return ""
}