// MustInt gets data int
518998
func (c *secureCookies) MustInt(key string, defaults ...int) int {
	ck, err := c.req.Cookie(key)
	if err != nil {
		if len(defaults) > 0 {
			return defaults[0]
		}
		return 0
	}
	s := parseSecureCookie(c.secret, ck.Value)
	v, err := strconv.Atoi(s)
	if len(defaults) > 0 && err != nil {
		return defaults[0]
	}
	return v
}
1151130
func ToInt(data interface{}) (int, bool) {
	switch typed := data.(type) {
	case int:
		return typed, true
	case int32:
		return int(typed), true
	case int64:
		return int(typed), true
	case uint:
		return int(typed), true
	case byte:
		return int(typed), true
	default:
		return 0, false
	}
}
1025648
func ToInt(in interface{}) (int, error) {
	if val, err := cast.ToIntE(in); err == nil {
		return val, nil
	}
	return 0, ErrBadType
}
1320609
func (p *Params) MustInt32(key string, defaults ...int32) int32 {
	r, err := strconv.ParseInt(p.Get(key), 10, 32)
	if len(defaults) > 0 && err != nil {
		return defaults[0]
	}

	return int32(r)
}
1206068
func (f *Forms) MustInt32(key string, defaults ...int32) int32 {
	v, err := strconv.ParseInt((*http.Request)(f).FormValue(key), 10, 32)
	if len(defaults) > 0 && err != nil {
		return defaults[0]
	}
	return int32(v)
}
212852
func Integer() *IntegerConstraint {
	c := &IntegerConstraint{}
	c.applyMinimum = false
	c.applyMaximum = false
	return c
}
1053010
func (g *PCPGaugeVector) MustInc(inc float64, instance string) {
	if err := g.Inc(inc, instance); err != nil {
		panic(err)
	}
}
543715
func (r *Reader) MustInt64(name string) int64 {
	i, err := r.readInt64(name)
	if err != nil {
		panic(err)
	}
	return i
}
1177506
func (c *JSONConfigContainer) DefaultInt(key string, defaultval int) int {
	if v, err := c.Int(key); err == nil {
		return v
	}
	return defaultval
}
1369026
func (context *BaseContext) GetInt(
	key string, defaultValue ...int) int {
	if value, ok := context.userData[key]; ok {
		if value, ok := value.(int); ok {
			return value
		}
	}
	if len(defaultValue) > 0 {
		return defaultValue[0]
	}
	return 0
}
1286765
func (f *Forms) MustInt(key string, defaults ...int) int {
	v, err := strconv.Atoi((*http.Request)(f).FormValue(key))
	if len(defaults) > 0 && err != nil {
		return defaults[0]
	}
	return v
}
173302
func (ctx *Context) FormInt(key string, defaults ...int) int {
	return (*Forms)(ctx.req).MustInt(key, defaults...)
}
1040118
func (j *Json) MustInt64(args ...int64) int64 {
	var def int64

	switch len(args) {
	case 0:
	case 1:
		def = args[0]
	default:
		log.Panicf("MustInt64() received too many arguments %d", len(args))
	}

	i, err := j.Int64()
	if err == nil {
		return i
	}

	return def
}
429178
func (c *cookies) MustInt64(key string, defaults ...int64) int64 {
	ck, err := c.req.Cookie(key)
	if err != nil {
		if len(defaults) > 0 {
			return defaults[0]
		}
		return 0
	}
	v, err := strconv.ParseInt(ck.Value, 10, 64)
	if len(defaults) > 0 && err != nil {
		return defaults[0]
	}
	return v
}
885233
func (j *Json) MustInt(args ...int) int {
	var def int

	switch len(args) {
	case 0:
	case 1:
		def = args[0]
	default:
		log.Panicf("MustInt() received too many arguments %d", len(args))
	}

	i, err := j.Int()
	if err == nil {
		return i
	}

	return def
}
1265899
func MustParseInt(s string) (i int) {
	i, _ = strconv.Atoi(s)
	return
}
1322570
func (f *Value) MustGet() interface{} {
	value, err := f.Get()
	if err != nil {
		panic(fmt.Sprintf("get returned error: %s", err))
	}
	return value
}