DecodeUntaggedUUIDValue decodes a value encoded by EncodeUntaggedUUIDValue.
(b []byte)
| 3164 | |
| 3165 | // DecodeUntaggedUUIDValue decodes a value encoded by EncodeUntaggedUUIDValue. |
| 3166 | func 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. |
| 3178 | func DecodeIPAddrValue(b []byte) (remaining []byte, u ipaddr.IPAddr, err error) { |
no test coverage detected
searching dependent graphs…