mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-11 01:36:37 +08:00
质量优化
This commit is contained in:
@@ -31,5 +31,9 @@ func init() {
|
||||
|
||||
// NextUint64ID 生成下一个分布式唯一 ID
|
||||
func NextUint64ID() uint64 {
|
||||
return uint64(node.Generate().Int64())
|
||||
val := node.Generate().Int64()
|
||||
if val < 0 {
|
||||
return 0
|
||||
}
|
||||
return uint64(val)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user