bwmarrin / snowflake

A simple to use Go (golang) package to generate or parse Twitter snowflake IDs
BSD 2-Clause "Simplified" License
2.98k stars 371 forks source link

ASCII ordered Base58Map to get sorted IDs and custome time input for NewNode #61

Closed Sujaybiradar25 closed 4 months ago

bwmarrin commented 8 months ago

There's a few things being changed here, including the go.mod file which we wouldn't want to change. Can you elaborate on your changes and why you think they should be made?

Sujaybiradar25 commented 7 months ago

There's a few things being changed here, including the go.mod file which we wouldn't want to change. Can you elaborate on your changes and why you think they should be made?

Changed repo name in go.mod and go.sum by mistake, will be removing in next commit

Sujaybiradar25 commented 7 months ago

Majorly added two things i.e : 1) Base58 chars used were not sorted, since this repo is used for id generation and mostly will be used as a primary key, this helps in faster searches in the db. 2) With time a variable it will be helpful for the client to have flexibility of start time. 3) Since Time() func was already planned to be removed, so removed it.