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

Method AppendStringer

internal/json/string.go:84–89  ·  view source on GitHub ↗

AppendStringer encodes the input Stringer to json and appends the encoded Stringer value to the input byte slice.

(dst []byte, val fmt.Stringer)

Source from the content-addressed store, hash-verified

82// AppendStringer encodes the input Stringer to json and appends the
83// encoded Stringer value to the input byte slice.
84func (e Encoder) AppendStringer(dst []byte, val fmt.Stringer) []byte {
85 if val == nil {
86 return e.AppendInterface(dst, nil)
87 }
88 return e.AppendString(dst, val.String())
89}
90
91// appendStringComplex is used by appendString to take over an in
92// progress JSON string encoding that encountered a character that needs

Callers 2

AppendStringersMethod · 0.95
TestAppendStringerFunction · 0.45

Calls 3

AppendInterfaceMethod · 0.95
AppendStringMethod · 0.95
StringMethod · 0.45

Tested by 1

TestAppendStringerFunction · 0.36