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

Function DecodeUntaggedUUIDValue

pkg/util/encoding/encoding.go:3166–3175  ·  view source on GitHub ↗

DecodeUntaggedUUIDValue decodes a value encoded by EncodeUntaggedUUIDValue.

(b []byte)

Source from the content-addressed store, hash-verified

3164
3165// DecodeUntaggedUUIDValue decodes a value encoded by EncodeUntaggedUUIDValue.
3166func DecodeUntaggedUUIDValue(b []byte) (remaining []byte, u uuid.UUID, err error) {
3167 if len(b) < uuidValueEncodedLength {
3168 return b, uuid.UUID{}, errors.Errorf("invalid uuid length of %d", len(b))
3169 }
3170 u, err = uuid.FromBytes(b[:uuidValueEncodedLength])
3171 if err != nil {
3172 return b, uuid.UUID{}, err
3173 }
3174 return b[uuidValueEncodedLength:], u, nil
3175}
3176
3177// DecodeIPAddrValue decodes a value encoded by EncodeIPAddrValue.
3178func DecodeIPAddrValue(b []byte) (remaining []byte, u ipaddr.IPAddr, err error) {

Callers 1

DecodeUUIDValueFunction · 0.85

Calls 2

FromBytesFunction · 0.92
ErrorfMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…