UInt64Values converts the lazily-decoded field data into a []uint64. See the [FieldData] docs for more specific details about interpreting lazily-decoded data.
()
| 318 | // |
| 319 | // See the [FieldData] docs for more specific details about interpreting lazily-decoded data. |
| 320 | func (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 | // |