From 1b582988725fad0ee43d3f9d17394f7c88578ecf Mon Sep 17 00:00:00 2001 From: godcong Date: Thu, 11 Jul 2024 20:50:44 +0800 Subject: [PATCH] refactor(ident): This update contains some major changes Separate subprojects Single registration at import Only one ID generator can be registered at a time --- ident/snowflake/snowflake.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ident/snowflake/snowflake.go b/ident/snowflake/snowflake.go index 6415f06..7a0c571 100644 --- a/ident/snowflake/snowflake.go +++ b/ident/snowflake/snowflake.go @@ -13,7 +13,7 @@ import ( // nodeNumber range from 0 to 1023 is used for generating unique node ID. var ( - nodeNumber = rand.Int63n(1023) + nodeNumber = rand.Int64N(1023) bitSize = 0 // bitSize is used to store the length of generated ID. )