MCPcopy Create free account
hub / github.com/segmentio/encoding / encodeUint

Function encodeUint

proto/uint.go:21–28  ·  view source on GitHub ↗
(b []byte, p unsafe.Pointer, flags flags)

Source from the content-addressed store, hash-verified

19}
20
21func encodeUint(b []byte, p unsafe.Pointer, flags flags) (int, error) {
22 if p != nil {
23 if v := *(*uint)(p); v != 0 || flags.has(wantzero) {
24 return encodeVarint(b, uint64(v))
25 }
26 }
27 return 0, nil
28}
29
30func decodeUint(b []byte, p unsafe.Pointer, _ flags) (int, error) {
31 v, n, err := decodeVarint(b)

Callers

nothing calls this directly

Calls 2

encodeVarintFunction · 0.85
hasMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…