// GetInt tries to read a integer value from a PluginConfig.
// If that value is not found defaultValue is returned.
765458
func (reader *PluginConfigReader) GetInt(key string, defaultValue int64) int64 {
	value, err := reader.WithError.GetInt(key, defaultValue)
	reader.Errors.Push(err)
	return value
}
389361
func (v *Object) GetInt64(keys ...string) (int64, error) {
	child, err := v.getPath(keys)

	if err != nil {
		return 0, err
	}
	n, err := child.Int64()

	if err != nil {
		return 0, err
	}
	return n, nil
}
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)
	}
}
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)
}
933131
func GetOrDefaultInt(envVar string, defaultValue int) int {
	v, err := strconv.Atoi(GetOrFile(envVar))
	if err != nil {
		return defaultValue
	}

	return v
}
1029564
func (node *Node) GetInt(key string) int {
	n, _ := strconv.Atoi(node.Values.Get(key))
	return n
}
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[:])
}
456212
func (a *Attribute) GetInt() (value int64, ok bool) {
	if a.Int == nil {
		return 0, false
	}

	return *a.Int, true
}
944308
func Int(key string, fallback int) int {
	return DefaultClient.Int(key, fallback)
}
867285
func (s StringStringMap) GetInt32(key string) (int32, error) {
	return s.getInt32(key, false)
}
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
}
452138
func (f EventFields) GetInt(key string) int {
	val, found := f[key]
	if !found {
		return 0
	}
	v, ok := val.(int)
	if !ok {
		f, ok := val.(float64)
		if ok {
			v = int(f)
		}
	}
	return v
}
652935
func (c *Context) GetInt64(key string) (i64 int64) {
	if val, ok := c.Get(key); ok && val != nil {
		i64, _ = val.(int64)
	}
	return
}
957702
func (ini *INI) GetInt(key string) (int, bool) {
    return ini.SectionGetInt(DefaultSection, key)
}
640745
func (c *Config) ReadInt(id string) (int, error) {
	val, ok := c.Options[id]
	if !ok {
		return 0, fmt.Errorf("Specified config is missing from options")
	}
	ival, err := strconv.Atoi(val)
	if err != nil {
		return 0, fmt.Errorf("Failed to parse %s as int: %s", val, err)
	}
	return ival, nil
}
939688
func (r *Store) GetInt64(key string) (int64, error) {
	v := r.GetEntry(key)
	if v == nil {
		return -1, fmt.Errorf(errFindParse, "int64", key)
	}
	return v.Int64Default(-1)
}
278892
func (p *Plugin) GetPort() int {
	if p.Config != nil {
		return p.Config.GetPort()
	}
	return 0
}