zheng-ji / goSnowFlake

一个实现 Twitter SnowFlake 算法 的 Go 分布式 UID 生成器.A threadsafe unique ID generator inspired by Twitter SnowFlake theory
MIT License
364 stars 75 forks source link

Thinking ID cant be negative, so why not uint64 #3

Closed leedstyh closed 8 years ago

leedstyh commented 8 years ago

Maybe add a signature like func (iw *IdWorker) NextIdU64() (ts uint64, err error) to keep the pkg compatible