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

Method Int32

event.go:590–596  ·  view source on GitHub ↗

Int32 adds the field key with i as a int32 to the *Event context.

(key string, i int32)

Source from the content-addressed store, hash-verified

588
589// Int32 adds the field key with i as a int32 to the *Event context.
590func (e *Event) Int32(key string, i int32) *Event {
591 if e == nil {
592 return e
593 }
594 e.buf = enc.AppendInt32(enc.AppendKey(e.buf, key), i)
595 return e
596}
597
598// Ints32 adds the field key with i as a []int32 to the *Event context.
599func (e *Event) Ints32(key string, i []int32) *Event {

Callers 5

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

Calls 2

AppendInt32Method · 0.65
AppendKeyMethod · 0.65

Tested by 5

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