MCPcopy
hub / github.com/rs/zerolog / Int16

Method Int16

event.go:572–578  ·  view source on GitHub ↗

Int16 adds the field key with i as a int16 to the *Event context.

(key string, i int16)

Source from the content-addressed store, hash-verified

570
571// Int16 adds the field key with i as a int16 to the *Event context.
572func (e *Event) Int16(key string, i int16) *Event {
573 if e == nil {
574 return e
575 }
576 e.buf = enc.AppendInt16(enc.AppendKey(e.buf, key), i)
577 return e
578}
579
580// Ints16 adds the field key with i as a []int16 to the *Event context.
581func (e *Event) Ints16(key string, i []int16) *Event {

Callers 5

TestEvent_WithNilEventFunction · 0.95
TestWithFunction · 0.45
TestFieldsFunction · 0.45
TestFieldsDisabledFunction · 0.45
TestArrayFunction · 0.45

Calls 2

AppendInt16Method · 0.65
AppendKeyMethod · 0.65

Tested by 5

TestEvent_WithNilEventFunction · 0.76
TestWithFunction · 0.36
TestFieldsFunction · 0.36
TestFieldsDisabledFunction · 0.36
TestArrayFunction · 0.36