UUID version 6 is a field-compatible version of UUIDv1, reordered for improved DB locality. It is expected that UUIDv6 will primarily be used in contexts where there are existing v1 UUIDs. Systems that do not involve legacy UUIDv1 SHOULD consider using UUIDv7 instead. see https://datatracker.ietf.o
()
| 22 | // SetClockSequence then it will be set automatically. If GetTime fails to |
| 23 | // return the current NewV6 returns Nil and an error. |
| 24 | func NewV6() (UUID, error) { |
| 25 | now, seq, err := GetTime() |
| 26 | if err != nil { |
| 27 | return Nil, err |
| 28 | } |
| 29 | return generateV6(now, seq), nil |
| 30 | } |
| 31 | |
| 32 | // NewV6WithTime returns a Version 6 UUID based on the current NodeID, clock |
| 33 | // sequence, and a specified time. It is similar to the NewV6 function, but allows |