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

Method AppendType

internal/cbor/types.go:443–448  ·  view source on GitHub ↗

AppendType appends the parameter type (as a string) to the input byte slice.

(dst []byte, i interface{})

Source from the content-addressed store, hash-verified

441
442// AppendType appends the parameter type (as a string) to the input byte slice.
443func (e Encoder) AppendType(dst []byte, i interface{}) []byte {
444 if i == nil {
445 return e.AppendString(dst, "<nil>")
446 }
447 return e.AppendString(dst, reflect.TypeOf(i).String())
448}
449
450// AppendIPAddr adds a net.IP IPv4 or IPv6 address into the dst byte array.
451func (e Encoder) AppendIPAddr(dst []byte, ip net.IP) []byte {

Callers 4

TypeMethod · 0.45
TypeMethod · 0.45
TypeMethod · 0.45
TestAppendTypeFunction · 0.45

Calls 2

AppendStringMethod · 0.95
StringMethod · 0.45

Tested by 1

TestAppendTypeFunction · 0.36