MCPcopy
hub / github.com/uptrace/uptrace / Append

Function Append

pkg/msgp/encoder.go:12–21  ·  view source on GitHub ↗
(b []byte, x any, flags AppendFlags)

Source from the content-addressed store, hash-verified

10)
11
12func Append(b []byte, x any, flags AppendFlags) ([]byte, error) {
13 if x == nil {
14 return AppendNil(b), nil
15 }
16 t := reflect.TypeOf(x)
17 p := (*eface)(unsafe.Pointer(&x)).ptr
18 b, err := AppendPointer(b, t, p, flags)
19 runtime.KeepAlive(x)
20 return b, err
21}
22func AppendPointer(b []byte, t reflect.Type, p unsafe.Pointer, flags AppendFlags) ([]byte, error) {
23 return CodecFor(t).Append(b, p, flags)
24}

Callers 5

AppendMapStringInterfaceFunction · 0.70
MarshalFunction · 0.70
encodeInterfaceMethod · 0.70

Calls 3

AppendNilFunction · 0.85
AppendPointerFunction · 0.85
PointerMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…