MCPcopy Create free account
hub / github.com/CrowdStrike/csproto / UInt64Values

Method UInt64Values

lazyproto/fielddata.go:320–336  ·  view source on GitHub ↗

UInt64Values converts the lazily-decoded field data into a []uint64. See the [FieldData] docs for more specific details about interpreting lazily-decoded data.

()

Source from the content-addressed store, hash-verified

318//
319// See the [FieldData] docs for more specific details about interpreting lazily-decoded data.
320func (fd *FieldData) UInt64Values() ([]uint64, error) {
321 if fd == nil || len(fd.data) == 0 {
322 return nil, ErrTagNotFound
323 }
324 s, err := sliceValue(fd, csproto.WireTypeVarint, fd.uint64Slice, func(data []byte) (uint64, int, error) {
325 value, n, err := csproto.DecodeVarint(data)
326 if err != nil {
327 return 0, 0, err
328 }
329 return value, n, nil
330 })
331 if fd.unsafe {
332 fd.maxCap = max(fd.maxCap, cap(s))
333 fd.uint64Slice = s
334 }
335 return s, err
336}
337
338// Int64Value converts the lazily-decoded field data into an int64.
339//

Callers 2

FuzzNumbersFunction · 0.45
TestUInt64FieldDataFunction · 0.45

Calls 2

DecodeVarintFunction · 0.92
sliceValueFunction · 0.85

Tested by 2

FuzzNumbersFunction · 0.36
TestUInt64FieldDataFunction · 0.36