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

Remove deprecated #32

Closed codemedic closed 3 years ago

codemedic commented 3 years ago

This removes some of the deprecated config elements by making use of a config object.

I have also removed some methods since keeping them would require making those aware of config; they were already marked for deprecation.

While doing the work I noticed a bug in the way encoding maps were setup, which I have fixed as well.

I have also sliced up the file since snowflake.go was growing longer.

bwmarrin commented 3 years ago

Hi there. Thanks for the PR.

This is changing a whole lot all in one PR and it's a bit tricky to clearly see the changes. It would actually be nice to break this up into a couple PRs that are more specific. But I'll try to sort through it and see if I understand it all.

bug in the way encoding maps were setup

Can you elaborate on the bug and your change?

Also, it'll need updated to pass golint so that the CI builds do not fail.

codemedic commented 3 years ago

Thanks; I will slice this up into multiple PRs.