It's really common to write ulid.Time(id.Time()) when using ULIDs. It would make sense for .Time() to return a time.Time, and for UnixMilli() to return the timestamp as ms. This mirrors the time package and is more ergonomic.
I don't necessarily disagree, but this would represent a breaking change, which is probably a non-starter. What about adding a new method that returns time.Time, maybe Timestamp?
It's really common to write
ulid.Time(id.Time())
when using ULIDs. It would make sense for.Time()
to return atime.Time
, and forUnixMilli()
to return the timestamp as ms. This mirrors the time package and is more ergonomic.