From 21772ce4342bc8ecbb3e7c8747bba9aec14f3bbb Mon Sep 17 00:00:00 2001 From: Taras Madan Date: Thu, 18 Jan 2024 17:24:16 +0100 Subject: Revert "mod: do: bump google.golang.org/api from 0.153.0 to 0.156.0" --- vendor/github.com/google/uuid/time.go | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) (limited to 'vendor/github.com/google/uuid/time.go') diff --git a/vendor/github.com/google/uuid/time.go b/vendor/github.com/google/uuid/time.go index c35112927..e6ef06cdc 100644 --- a/vendor/github.com/google/uuid/time.go +++ b/vendor/github.com/google/uuid/time.go @@ -108,23 +108,12 @@ func setClockSequence(seq int) { } // Time returns the time in 100s of nanoseconds since 15 Oct 1582 encoded in -// uuid. The time is only defined for version 1, 2, 6 and 7 UUIDs. +// uuid. The time is only defined for version 1 and 2 UUIDs. func (uuid UUID) Time() Time { - var t Time - switch uuid.Version() { - case 6: - time := binary.BigEndian.Uint64(uuid[:8]) // Ignore uuid[6] version b0110 - t = Time(time) - case 7: - time := binary.BigEndian.Uint64(uuid[:8]) - t = Time((time>>16)*10000 + g1582ns100) - default: // forward compatible - time := int64(binary.BigEndian.Uint32(uuid[0:4])) - time |= int64(binary.BigEndian.Uint16(uuid[4:6])) << 32 - time |= int64(binary.BigEndian.Uint16(uuid[6:8])&0xfff) << 48 - t = Time(time) - } - return t + time := int64(binary.BigEndian.Uint32(uuid[0:4])) + time |= int64(binary.BigEndian.Uint16(uuid[4:6])) << 32 + time |= int64(binary.BigEndian.Uint16(uuid[6:8])&0xfff) << 48 + return Time(time) } // ClockSequence returns the clock sequence encoded in uuid. -- cgit mrf-deployment