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

Function FromBytes

pkg/util/uuid/codec.go:27–31  ·  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

25// FromBytes returns a UUID generated from the raw byte slice input.
26// It will return an error if the slice isn't 16 bytes long.
27func FromBytes(input []byte) (UUID, error) {
28 u := UUID{}
29 err := u.UnmarshalBinary(input)
30 return u, err
31}
32
33// FromBytesOrNil returns a UUID generated from the raw byte slice input.
34// 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…