// GetInt returns the default integer value for an auto configured field.
// When not set, 0 is returned. Metrics are not applied to this value.
164852
func (tag PluginStructTag) GetInt() int64 {
	tagValue, tagSet := reflect.StructTag(tag).Lookup(PluginStructTagDefault)
	if !tagSet || len(tagValue) == 0 {
		return 0
	}

	value, err := tstrings.AtoI64(tagValue)
	if err != nil {
		panic(err)
	}
	return value
}
888458
func (d *Context) GetInt(index int) int {
	return int(C.duk_get_int(d.duk_context, C.duk_idx_t(index)))
}
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
}
1079674
func (m *Manager) GetInt(key string) int {
	return cast.ToInt(m.Get(key))
}
765458
func (reader *PluginConfigReader) GetInt(key string, defaultValue int64) int64 {
	value, err := reader.WithError.GetInt(key, defaultValue)
	reader.Errors.Push(err)
	return value
}
175060
func (i Int) Get() (int, error) {
	if !i.Present() {
		var zero int
		return zero, errors.New("value not present")
	}
	return *i.value, nil
}
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
}
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)
}
1298450
func (v *Value) StoreInt(i int) {
	*v = Value{t: reflect.Int, i: 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)
}
294706
func (s *promScope) SetInt(stat string, value int64) {
	s.autoGauge(s.statName(stat)).Set(float64(value))
}
1251745
func Int(name rune, value int, helpvalue ...string) *int {
	return CommandLine.Int(name, value, helpvalue...)
}
1340428
func (c *ConfigLookup) GetInt(key string) int {
	value, ok := c.Lookup(key)
	if !ok {
		return 0
	}
	return cast.ToInt(value)
}
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)
}
1091559
func GetInt64(r Retriever, k Key) (int64, error) {
	val, err := r.Get(k)
	if IsErrNotFound(err) {
		return 0, nil
	}
	if err != nil {
		return 0, err
	}
	intVal, err := strconv.ParseInt(string(val), 10, 0)
	if err != nil {
		return intVal, errors.Trace(err)
	}
	return intVal, nil
}
944308
func Int(key string, fallback int) int {
	return DefaultClient.Int(key, fallback)
}
30337
func (a *Attribute) getInt() int64 {
	if a.Int == nil {
		return 0
	}

	i := *a.Int

	// Get the unit
	u := a.getTypedUnit()

	// If there is no unit just return the int
	if u == nil {
		return i
	}

	if u.InverseMultiplier {
		i /= u.Multiplier
	} else {
		i *= u.Multiplier
	}

	return i
}