gofrs / uuid

A UUID package for Go
MIT License
1.58k stars 111 forks source link

stop using UnixMill() to make legacy versions compatible #104

Closed convto closed 1 year ago

convto commented 1 year ago

The following PR makes use of UnixMill() to get milli-precision timestamps. https://github.com/gofrs/uuid/pull/99

UnixMill() was added in go1.17, so it seems that the latest gofrs/uuid is not available from older versions of go.

According to Go's release policy, the last two versions of go are supported. Therefore, I don't think it is a critical issue that it is not available for go versions older than go1.16. However, since we expect some users to use older versions of go, we thought it would be better to stop using UnixMill().

dylan-bourque commented 1 year ago

Everyone should definitely be updating to newer Go versions, but "We want to use time.UnixMilli() internally" doesn't feel like a good reason to force that decision on everyone.

convto commented 1 year ago

@cameracker In relation to the PR (#99) I sent out previous, I have made some changes for compatibility from the old Go.

If you have time, I would appreciate your review. If there are no problems with the PR, please release it.

cameracker commented 1 year ago

Thanks a ton for identifying this issue and submitting a fix!