Closed axetroy closed 4 years ago
Can you give me some more context of what you're wanting?
In some cases, we only have ID string
We need to know if it is a valid ID and which node this ID was generated from and when
What format is the ID in though. "string" is a bit ambiguous.
Is it a string of numbers like "8217397129123" or some other format?
Have you tried using https://github.com/bwmarrin/snowflake/blob/master/snowflake.go#L169 ? If it's a string of numbers, you can convert that into an int64 easily enough, then parse it with that function. After doing that, you can use the library to return the node.
@bwmarrin I see. Thx.