// Int16Null decodes the JSON value within an object or an array to an *int.
// If next key value overflows int16, an InvalidUnmarshalError error will be returned.
178057
func (dec *Decoder) Int16Null(v **int16) error {
	err := dec.decodeInt16Null(v)
	if err != nil {
		return err
	}
	dec.called |= 1
	return nil
}
594211
func (ae *AttributeEncoder) Uint16(typ uint16, v uint16) {
	if ae.err != nil {
		return
	}

	b := make([]byte, 2)
	ae.ByteOrder.PutUint16(b, v)

	ae.attrs = append(ae.attrs, Attribute{
		Type: typ,
		Data: b,
	})
}
616813
func (r *Store) GetInt16(key string) (int16, error) {
	v, ok := r.GetEntry(key)
	if !ok {
		return -1, errFindParse.Format("int16", key)
	}
	return v.Int16Default(-1)
}
1362301
func Int16Field(name string, value int16) FieldOpt {
	return func(em *eventMetadata, ed *eventData) {
		em.writeField(name, inTypeInt16, outTypeDefault, 0)
		ed.writeInt16(value)
	}
}
952680
func (dec *Decoder) SQLNullFloat64(v *sql.NullFloat64) error {
	var b *float64
	if err := dec.Float64Null(&b); err != nil {
		return err
	}
	if b == nil {
		v.Valid = false
	} else {
		v.Float64 = *b
		v.Valid = true
	}
	return nil
}
181787
func StringToInt16(from string) (int16, error) {
	val, err := strconv.ParseInt(from, DefeultNumericBase, 16)
	return int16(val), err
}
1326510
func (dec *Decoder) SQLNullInt64(v *sql.NullInt64) error {
	var b *int64
	if err := dec.Int64Null(&b); err != nil {
		return err
	}
	if b == nil {
		v.Valid = false
	} else {
		v.Int64 = *b
		v.Valid = true
	}
	return nil
}
645399
func (enc *Encoder) Uint16KeyOmitEmpty(key string, v uint16) {
	enc.Uint64KeyOmitEmpty(key, uint64(v))
}
938502
func (e Encoder) AppendInt16(dst []byte, val int16) []byte {
	return e.AppendInt(dst, int(val))
}
895569
func (dec *Decoder) Float64Null(v **float64) error {
	err := dec.decodeFloat64Null(v)
	if err != nil {
		return err
	}
	dec.called |= 1
	return nil
}
1128941
func (b *readBuf) int16() (n int) {
	n = int(binary.BigEndian.Uint16(*b))
	*b = (*b)[2:]
	return
}
547925
func (e *Event) Uint16(key string, i uint16) *Event {
	if e == nil {
		return e
	}
	e.buf = enc.AppendUint16(enc.AppendKey(e.buf, key), i)
	return e
}
926573
func MinInt16N(v ...int16) int16 {
	switch len(v) {
	case 0:
		return 0
	case 1:
		return v[0]
	case 2:
		return MinInt16(v[0], v[1])
	default:
		l := len(v) / 2
		return MinInt16N(MinInt16N(v[:l]...), MinInt16N(v[l:]...))
	}
}
145461
func Int16(name rune, value int16, helpvalue ...string) *int16 {
	return CommandLine.Int16(name, value, helpvalue...)
}
1113736
func (n *NullInt64) UnmarshalJSON(b []byte) error {
	var s json.Number
	if err := json.Unmarshal(b, &s); err != nil {
		return err
	}
	if s == "" {
		return n.Scan(nil)
	}
	return n.Scan(s)
}
638356
func Uint16Bytes(v uint16) []byte {
	b := make([]byte, 2)
	PutUint16(b, v)
	return b
}
812489
func (enc *Encoder) WriteInt16(val int16) error {
	return enc.WriteInt(int(val))
}