MCPcopy
hub / github.com/tinylib/msgp / ReadDurationBytes

Function ReadDurationBytes

msgp/read_bytes.go:412–415  ·  view source on GitHub ↗

ReadDurationBytes tries to read a time.Duration from 'b' and return the value and the remaining bytes. Possible errors: - [ErrShortBytes] (too few bytes) - TypeError (not a int)

(b []byte)

Source from the content-addressed store, hash-verified

410// - [ErrShortBytes] (too few bytes)
411// - TypeError (not a int)
412func ReadDurationBytes(b []byte) (d time.Duration, o []byte, err error) {
413 i, o, err := ReadInt64Bytes(b)
414 return time.Duration(i), o, err
415}
416
417// ReadInt64Bytes tries to read an int64
418// from 'b' and return the value and the remaining bytes.

Callers 1

FuzzReadBytesFunction · 0.85

Calls 1

ReadInt64BytesFunction · 0.85

Tested by 1

FuzzReadBytesFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…