// GetInt gets the specified bool attribute.
545366
func (c ConfigAttributes) GetBool(attrName string, defaultValue bool) bool {
	if val, ok := c[attrName]; ok {
		return val.(bool)
	}
	return defaultValue
}
39126
func (s *Session) GetIntDefault(key string, defaultValue int) int {
	if v, err := s.GetInt(key); err == nil {
		return v
	}
	return defaultValue
}
1003798
func GetIntFromConstant(ctx sessionctx.Context, value Expression) (int, bool, error) {
	str, isNull, err := GetStringFromConstant(ctx, value)
	if err != nil || isNull {
		return 0, true, err
	}
	intNum, err := strconv.Atoi(str)
	if err != nil {
		return 0, true, nil
	}
	return intNum, false, nil
}
675909
func ConvertToInt(target string, def int) int {
	fo, err := strconv.Atoi(target)
	if err != nil {
		return def
	}
	return fo
}
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)
}
888901
func (f *Flash) GetInt(key string) int {
	r, _ := f.Get(key).(int)
	return r
}
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
}
793567
func GetInt(key string, defaultValue int) int {
	result, err := factory.GetValue(key).ToInt()
	if err != nil {
		return defaultValue
	}
	return result
}
683709
func GetInt(r *http.Request, name string, value int) int {
	v := r.FormValue(name)
	if i, err := strconv.Atoi(v); err == nil {
		return i
	}
	return value
}
892405
func (s Slice) GetInt() (int64, error) {
	h := s.head()

	if h >= 0x20 && h <= 0x27 {
		// Int  T
		v := readIntegerNonEmpty(s[1:], uint(h)-0x1f)
		if h == 0x27 {
			return toInt64(v), nil
		} else {
			vv := int64(v)
			shift := int64(1) << ((h-0x1f)*8 - 1)
			if vv < shift {
				return vv, nil
			} else {
				return vv - (shift << 1), nil
			}
		}
	}

	if h >= 0x28 && h <= 0x2f {
		// UInt
		v, err := s.GetUInt()
		if err != nil {
			return 0, WithStack(err)
		}
		if v > math.MaxInt64 {
			return 0, WithStack(NumberOutOfRangeError)
		}
		return int64(v), nil
	}

	if h >= 0x30 && h <= 0x3f {
		// SmallInt
		return s.GetSmallInt()
	}

	return 0, WithStack(InvalidTypeError{"Expecting type Int"})
}
553722
func getInt(unk interface{}) int64 {
	switch i := unk.(type) {
	case int64:
		return i
	case float64:
		return int64(i)
	case string:
		v, err := strconv.ParseInt(i, 10, 64)
		if err != nil {
			return int64(0)
		}
		return v
	default:
		return int64(0)
	}
}
1004871
func (env *Env) GetInt(key string) int {
	return int(env.GetInt64(key))
}
425649
func (c Flags) Int(name string) int {
	f := c.Get(name)
	if f == nil {
		return -1
	}
	return *f.Value.(*int)
}
119185
func (i Int32) Get() (int32, error) {
	if !i.Present() {
		var zero int32
		return zero, errors.New("value not present")
	}
	return *i.value, nil
}
1087368
func (c *PackageFile) GetInt(header, tag int) int64 {
	if c == nil || header >= len(c.Headers) {
		return 0
	}
	return c.Headers[header].Indexes.IntByTag(tag)
}
1207403
func (v Value) GetInt() (int, error) {
	var err error

	if v.t != reflect.Int {
		err = fmt.Errorf("not a int Value")
	}

	return v.i, err
}
867285
func (s StringStringMap) GetInt32(key string) (int32, error) {
	return s.getInt32(key, false)
}