Open kohenkatz opened 2 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 100.00%. Comparing base (
2f6f9f4
) to head (ee708e7
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Nice. Looks good so far. I think it was the right call to add some additional functions. As a mega nit, what do you think of the convention NewVNFromTime()
?
... what do you think of the convention
NewVNFromTime()
?
Personally, I like At
over From
for three reasons:
At
as an indicator that something is a timestamp. For example, Laravel's created_at
, updated_at
, and deleted_at
database fields.All that said, I really don't care if you want to change it.
@kohenkatz Dependabot updated the go-setup github action, and I noted we were testing against older versions of go so I took the opportunity to kick them up to latest and latest -1. Might be worth rebasing against master :)
@kohenkatz Hi, heads up, I fat fingered the update branch button. You'll want to do a pull when you pick this back up again. Apologies.
This PR implements the request in #84 to be able to create UUIDs at specific known timestamps, in addition to the current time.
Although that request only mentions UUIDv1, this PR also includes the other two time-based UUID versions, namely v6 and v7.
To prevent code duplication, this PR reimplements
NewV1
,NewV6
, andNewV7
to each call their respectiveNewV<X>AtTime
with the providedEpochFunc
, which defaults to providing the current time.This PR will remain a draft until I have time to write some tests...