// translates an integer key into a string, without checks
161694
func (s Slice) translateUnchecked() Slice {
	id := s.getUIntUnchecked()
	key := attributeTranslator.IDToString(id)
	if key == "" {
		return nil
	}
	return StringSlice(key)
}
1327687
func (c *IniConfigContainer) Int(key string) (int, error) {
	return strconv.Atoi(c.getdata(key))
}
79289
func (c Context) Int(key string, i int) Context {
	c.l.context = enc.AppendInt(enc.AppendKey(c.l.context, key), i)
	return c
}
652869
func (s *TranslateFile) TranslateRowToString(index, field string, id uint64) (string, error) {
	s.mu.RLock()
	if idx := s.rows[fieldKey{index, field}]; idx != nil {
		if ret, ok := idx.keyByID(id); ok {
			s.mu.RUnlock()
			return string(ret), nil
		}
	}
	s.mu.RUnlock()
	return "", nil
}
1005683
func (h Hash) Int64(key string) (int64, error) {
	if value, ok := h[key]; ok {
		return value.Int64()
	}
	return 0, errors.New(ErrInvalidKey, errorMessages, key)
}
1270114
func (c *client) Int(key string, fallback int) int {
	if i, err := strconv.Atoi(c.Getenv(key)); err == nil {
		return i
	}

	return fallback
}
1087121
func (v IntegerValue) String() string {
	return fmt.Sprintf("%v %v", time.Unix(0, v.unixnano), v.Value())
}
840103
func (s Slice) translate() (Slice, error) {
	if !s.IsSmallInt() && !s.IsUInt() {
		return nil, WithStack(InvalidTypeError{"Cannot translate key of this type"})
	}
	if attributeTranslator == nil {
		return nil, WithStack(NeedAttributeTranslatorError)
	}
	return s.translateUnchecked(), nil
}
356752
func (t *iterator) Key() []byte {
	if t.i0 < 0 {
		return nil
	}
	return t.buf[t.i0][fKey]
}
1004871
func (env *Env) GetInt(key string) int {
	return int(env.GetInt64(key))
}
1074395
func Key(s string) (*[32]byte, error) {
	if len(s) < 32 {
		return nil, errInvalidKeyLength
	}
	var key [32]byte
	copy(key[:], []byte(s))
	return &key, nil
}
694673
func (c *Config) GetInt64(key string) (i int64, err error) {
	val, ok := (*c)[key]
	if !ok {
		return 0, ErrNoSuchKey
	}
	switch val.(type) {
	case int8:
		return int64(val.(int8)), nil
	case int16:
		return int64(val.(int16)), nil
	case int:
		return int64(val.(int)), nil
	case int32:
		return int64(val.(int32)), nil
	case int64:
		return val.(int64), nil
	case float64:
		// json loads float64 so handle that case
		return int64(val.(float64)), nil
	default:
		return 0, fmt.Errorf("Wrong type for %s (Type:%T Expecting:%T)", key, val, i)
	}
}
776029
func (k *Key) String() string {
	if len(k.pairs)%2 != 0 {
		panic("odd") // never happens, validated by KeySet.Key(...) constructor
	}
	sb := strings.Builder{}
	sb.WriteRune('[')
	for i := 0; i < len(k.pairs)/2; i++ {
		kind, id := k.pairs[i*2], k.pairs[i*2+1]
		if i != 0 {
			sb.WriteString(", ")
		}
		sb.WriteString(kind)
		sb.WriteRune('(')
		sb.WriteString(strconv.Quote(id))
		sb.WriteRune(')')
	}
	sb.WriteRune(']')
	return sb.String()
}
1320243
func (enc *Encoder) AddIntKey(key string, v int) {
	enc.IntKey(key, v)
}
112036
func ConvertIntToInt(val int64, lowerBound int64, upperBound int64, tp byte) (int64, error) {
	if val < lowerBound {
		return lowerBound, overflow(val, tp)
	}

	if val > upperBound {
		return upperBound, overflow(val, tp)
	}

	return val, nil
}
555063
func (k *Key) Uint() (uint, error) {
	u, e := strconv.ParseUint(k.String(), 0, 64)
	return uint(u), e
}
603056
func (d Data) GetInt(key string) int {
	if !d.KeyExists(key) || len(d.Values[key]) == 0 {
		return 0
	}
	str := d.Get(key)
	if result, err := strconv.Atoi(str); err != nil {
		panic(err)
	} else {
		return result
	}
}