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

Method IPPrefixes

event.go:904–910  ·  view source on GitHub ↗

IPPrefixes the field key with pfx as a net.IPNet array of IPv4 or IPv6 Prefixes (address and mask) to the event

(key string, pfx []net.IPNet)

Source from the content-addressed store, hash-verified

902
903// IPPrefixes the field key with pfx as a net.IPNet array of IPv4 or IPv6 Prefixes (address and mask) to the event
904func (e *Event) IPPrefixes(key string, pfx []net.IPNet) *Event {
905 if e == nil {
906 return e
907 }
908 e.buf = enc.AppendIPPrefixes(enc.AppendKey(e.buf, key), pfx)
909 return e
910}
911
912// MACAddr the field key with ha as a net.HardwareAddr MAC address to the event
913func (e *Event) MACAddr(key string, ha net.HardwareAddr) *Event {

Callers 8

TestEvent_WithNilEventFunction · 0.95
TestFieldsArrayNilFunction · 0.45
TestFieldsArrayEmptyFunction · 0.45
BenchmarkLogFieldTypeFunction · 0.45

Calls 2

AppendKeyMethod · 0.65
AppendIPPrefixesMethod · 0.45

Tested by 8

TestEvent_WithNilEventFunction · 0.76
TestFieldsArrayNilFunction · 0.36
TestFieldsArrayEmptyFunction · 0.36
BenchmarkLogFieldTypeFunction · 0.36