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

Method AppendBytes

internal/cbor/string.go:61–72  ·  view source on GitHub ↗

AppendBytes encodes and adds an array of bytes to the dst byte array.

(dst, s []byte)

Source from the content-addressed store, hash-verified

59
60// AppendBytes encodes and adds an array of bytes to the dst byte array.
61func (Encoder) AppendBytes(dst, s []byte) []byte {
62 major := majorTypeByteString
63
64 l := len(s)
65 if l <= additionalMax {
66 lb := byte(l)
67 dst = append(dst, major|lb)
68 } else {
69 dst = appendCborTypePrefix(dst, major, uint64(l))
70 }
71 return append(dst, s...)
72}
73
74// AppendEmbeddedJSON adds a tag and embeds input JSON as such.
75func AppendEmbeddedJSON(dst, s []byte) []byte {

Callers 4

AppendIPAddrMethod · 0.95
AppendIPPrefixMethod · 0.95
AppendMACAddrMethod · 0.95
AppendHexMethod · 0.95

Calls 1

appendCborTypePrefixFunction · 0.85

Tested by

no test coverage detected