// GetInt8 returns the entry's value as int8, based on its key.
// If not found returns -1 and a non-nil error.
4116
func (r *Store) GetInt8(key string) (int8, error) {
	v, ok := r.GetEntry(key)
	if !ok {
		return -1, errFindParse.Format("int8", key)
	}
	return v.Int8Default(-1)
}
1111474
func (c *Context) GetInt(key interface{}) (int, bool) {
	value, ok := c.GetOk(key)
	if !ok {
		if c.Parent != nil {
			return c.Parent.GetInt(key)
		}
	}
	if num, ok := value.(int); ok {
		return num, ok
	}
	return 0, false
}
1060693
func (mc *MCP23017Config) getUint8Value() uint8 {
	return mc.Bank<<7 | mc.Mirror<<6 | mc.Seqop<<5 | mc.Disslw<<4 | mc.Haen<<3 | mc.Odr<<2 | mc.Intpol<<1
}
923626
func (r Row) GetInt64(colIdx int) int64 {
	col := r.c.columns[colIdx]
	return *(*int64)(unsafe.Pointer(&col.data[r.idx*8]))
}
952274
func GetInt(data []byte, keys ...string) (val int64, err error) {
	v, t, _, e := Get(data, keys...)

	if e != nil {
		return 0, e
	}

	if t != Number {
		return 0, fmt.Errorf("Value is not a number: %s", string(v))
	}

	return ParseInt(v)
}
1192075
func (RPCResponse *RPCResponse) GetInt() (int64, error) {
	val, ok := RPCResponse.Result.(json.Number)
	if !ok {
		return 0, fmt.Errorf("could not parse int64 from %s", RPCResponse.Result)
	}

	i, err := val.Int64()
	if err != nil {
		return 0, err
	}

	return i, nil
}
992286
func (m *Manager) GetInt16(key string) int16 {
	return cast.ToInt16(m.Get(key))
}
265265
func (r *Store) GetInt(key string) (int, error) {
	v, ok := r.GetEntry(key)
	if !ok {
		return 0, errFindParse.Format("int", key)
	}
	return v.IntDefault(-1)
}
1039931
func (r *Store) GetIntDefault(key string, def int) int {
	if v, err := r.GetInt(key); err == nil {
		return v
	}

	return def
}
22829
func (c *Config) GetInt64(key string) (i int64) {
	i64, _ := c.GetInt64Ok(key)
	return i64
}
918593
func (m *Manager) GetInt64(key string) int64 {
	return cast.ToInt64(m.Get(key))
}
889492
func (s *Session) GetInt64(key string) (int64, error) {
	v := s.Get(key)

	if vint64, ok := v.(int64); ok {
		return vint64, nil
	}

	if vint, ok := v.(int); ok {
		return int64(vint), nil
	}

	if vstring, sok := v.(string); sok {
		return strconv.ParseInt(vstring, 10, 64)
	}

	return -1, fmt.Errorf(errFindParse, "int64", key)
}
1319620
func GetInt(n ast.Node) (int64, error) {
	if node, ok := n.(*ast.BasicLit); ok && node.Kind == token.INT {
		return strconv.ParseInt(node.Value, 0, 64)
	}
	return 0, fmt.Errorf("Unexpected AST node type: %T", n)
}
1358843
func (e *Entity) GetInt32(name string) (int32, bool) {
	x, ok := e.Get(name).(int32)
	return x, ok
}
1057051
func (dec *Decoder) Int8(v *int8) error {
	err := dec.decodeInt8(v)
	if err != nil {
		return err
	}
	dec.called |= 1
	return nil
}
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)
	}
}
457467
func (s *Session) GetInt64(key string) (int64, error) {
	v := s.Get(key)

	if vint64, ok := v.(int64); ok {
		return vint64, nil
	}

	if vfloat64, ok := v.(float64); ok {
		return int64(vfloat64), nil
	}

	if vint, ok := v.(int); ok {
		return int64(vint), nil
	}

	if vstring, sok := v.(string); sok {
		return strconv.ParseInt(vstring, 10, 64)
	}

	return -1, errFindParse.Format("int64", key, v)
}