// Int returns the value associated with the key as a int.
337550
func (s *Session) Int(key string) int {
	s.RLock()
	defer s.RUnlock()

	v, ok := s.data[key]
	if !ok {
		return 0
	}

	value, ok := v.(int)
	if !ok {
		return 0
	}
	return value
}
1360338
func (r *Reply) Int() (int64, error) {
	if r.Type() == ReplyInteger {
		return r.integerValue, nil
	}
	s, err := r.String()
	if err != nil {
		return 0, err
	}
	x, err := strconv.ParseInt(s, 10, 64)
	if err != nil {
		return 0, ErrConvert
	}
	return x, nil
}
1059378
func (c *ConfigFile) Int(section, key string) (int, error) {
	value, err := c.GetValue(section, key)
	if err != nil {
		return 0, err
	}
	return strconv.Atoi(value)
}
522421
func (f Field) Int() (int, error) {
	x, err := strconv.ParseInt(f.value, 10, 32)
	return int(x), err
}
1004871
func (env *Env) GetInt(key string) int {
	return int(env.GetInt64(key))
}
1360377
func (lr *LockedRand) Int() (n int) {
	lr.lk.Lock()
	n = lr.r.Int()
	lr.lk.Unlock()
	return
}
802224
func (s *Session) GetInt(key string) int {
	r, _ := s.Get(key).(int)
	return r
}
4210
func (f Flag) Int(name string) (int, error) {
	v, err := f.value(name)
	if err != nil {
		return 0, err
	}

	i, err := strconv.Atoi(v)
	if err != nil {
		return 0, err
	}

	return i, nil
}
1209503
func (t *Tag) Int(i int) (int, error) {
	if t.format != IntVal {
		return 0, t.typeErr(IntVal)
	}
	return int(t.intVals[i]), nil
}
833244
func Int(v interface{}, err error) (int64, error) {
	if err != nil {
		return 0, err
	}
	vi, ok := v.(int64)
	if ok {
		return vi, nil
	}

	vbi, ok := v.(*big.Int)
	if ok {
		if vbi.BitLen() <= 63 {
			return vbi.Int64(), nil
		}
	}

	return 0, newWrongTypeError(v, vi)

}
633309
func Int(base int, min int, max int) Validator {
	return func(args []string) int {
		if len(args) == 0 {
			return -1
		}
		i, err := strconv.ParseInt(args[0], base, 0)
		if err != nil || int(i) < min || int(i) > max {
			return -1
		}
		return 1
	}
}
1193896
func (args Arguments) Int(index int) int {
	var s int
	var ok bool
	if s, ok = args.Get(index).(int); !ok {
		panic(fmt.Sprintf("assert: arguments: Int(%d) failed because object wasn't correct type: %v", index, args.Get(index)))
	}
	return s
}
207811
func (e *delayedEnvironment) Int(key string, def int) int {
	e.Load()
	return e.env.Int(key, def)
}
805106
func (c *Context) Int(name string) int {
	return lookupInt(name, c.flagSet)
}
241046
func (v Value) Int() (int, error) {
	i, err := strconv.Atoi(v.String())
	if err != nil {
		return 0, v.invalidTypeError(err, "int")
	}
	return i, nil
}
630168
func Int(names []string, value int, usage string) *int {
	return CommandLine.Int(names, value, usage)
}
904531
func Int(v int) *int32 {
	p := new(int32)
	*p = int32(v)
	return p
}