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

Method AppendStringer

internal/cbor/string.go:53–58  ·  view source on GitHub ↗

AppendStringer encodes and adds the Stringer value to the dst byte array.

(dst []byte, val fmt.Stringer)

Source from the content-addressed store, hash-verified

51// AppendStringer encodes and adds the Stringer value to the dst
52// byte array.
53func (e Encoder) AppendStringer(dst []byte, val fmt.Stringer) []byte {
54 if val == nil {
55 return e.AppendNil(dst)
56 }
57 return e.AppendString(dst, val.String())
58}
59
60// AppendBytes encodes and adds an array of bytes to the dst byte array.
61func (Encoder) AppendBytes(dst, s []byte) []byte {

Callers 3

AppendStringersMethod · 0.95
StringerMethod · 0.45
TestAppendStringerFunction · 0.45

Calls 3

AppendNilMethod · 0.95
AppendStringMethod · 0.95
StringMethod · 0.45

Tested by 1

TestAppendStringerFunction · 0.36