// MustInt returns the value for key (same as GetInt) but panics if the key was
// blank or if the value is an invalid int.
338663
func (ec *Envcfg) MustInt(key string) int {
	val := ec.MustKey(key)
	i, err := strconv.Atoi(val)
	if err != nil {
		panic(fmt.Sprintf("key %s must be a valid int", key))
	}
	return i
}
1191711
func (c Config) GetInt(key string) (int64, error) {
	var (
		iout int64
		val  interface{}
		ok   bool
	)

	if val, ok = c[key]; !ok {
		return iout, ErrConfigNotFound
	}

	if iout, ok = val.(int64); !ok {
		return iout, ErrNotAnInt
	}

	return iout, nil
}
1228337
func (r *Store) GetInt(key string) (int, error) {
	v := r.GetEntry(key)
	if v == nil {
		return 0, fmt.Errorf(errFindParse, "int", key)
	}
	return v.IntDefault(-1)
}
1265899
func MustParseInt(s string) (i int) {
	i, _ = strconv.Atoi(s)
	return
}
700285
func (d *Context) RequireInt(index int) int {
	return int(C.duk_require_int(d.duk_context, C.duk_idx_t(index)))
}
1178351
func (c *PCPCounterVector) MustInc(inc int64, instance string) {
	if err := c.Inc(inc, instance); err != nil {
		panic(err)
	}
}
907154
func (ec *Envcfg) GetInt(key string) int {
	i, _ := strconv.Atoi(ec.GetKey(key))
	return i
}
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)
}
218134
func (m *memData) GetInt(name string) (int, error) {
	m.l.RLock()
	defer m.l.RUnlock()
	i, ok := m.ints[name]
	if !ok {
		return 0, ErrNotFound
	}
	return i, nil
}
543715
func (r *Reader) MustInt64(name string) int64 {
	i, err := r.readInt64(name)
	if err != nil {
		panic(err)
	}
	return i
}
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[:])
}
1103254
func toInt(v reflect.Value) int {
	i, _ := tryToInt(v)
	return i
}
782457
func (p *Params) MustInt(key string, defaults ...int) int {
	v, err := strconv.Atoi(p.Get(key))
	if len(defaults) > 0 && err != nil {
		return defaults[0]
	}
	return v
}
1036383
func MustInt(input interface{}) int64 {
	output, err := Int(input)
	if err != nil {
		panic(err)
	}
	return output
}
1191312
func mustParseInt(expr string) (uint, error) {
	num, err := strconv.Atoi(expr)
	if err != nil {
		return 0, fmt.Errorf("Failed to parse int from %s: %s", expr, err)
	}
	if num < 0 {
		return 0, fmt.Errorf("Negative number (%d) not allowed: %s", num, expr)
	}

	return uint(num), nil
}
178544
func (c *C) MustPostInt(key string, d int) int {
	val := c.Request.PostFormValue(key)
	if val == "" {
		return d
	}
	i, err := strconv.Atoi(val)
	if err != nil {
		panic(err.Error())
	}

	return i
}
205220
func (list *SkipList) MustGetValue(key interface{}) interface{} {
	element := list.Get(key)

	if element == nil {
		panic("cannot find key in skiplist")
	}

	return element.Value
}