MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / FromBytes

Function FromBytes

pkg/util/uuid/codec.go:22–26  ·  view source on GitHub ↗

FromBytes returns a UUID generated from the raw byte slice input. It will return an error if the slice isn't 16 bytes long.

(input []byte)

Source from the content-addressed store, hash-verified

20// FromBytes returns a UUID generated from the raw byte slice input.
21// It will return an error if the slice isn't 16 bytes long.
22func FromBytes(input []byte) (UUID, error) {
23 u := UUID{}
24 err := u.UnmarshalBinary(input)
25 return u, err
26}
27
28// FromBytesOrNil returns a UUID generated from the raw byte slice input.
29// Same behavior as FromBytes(), but returns uuid.Nil instead of an error.

Callers 4

ParseDUuidFromBytesFunction · 0.92
DecodeUntaggedUUIDValueFunction · 0.92
FromUint128Function · 0.70
FromBytesOrNilFunction · 0.70

Calls 1

UnmarshalBinaryMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…