kubbot & kubecub 74de8825f6 fix bug
Signed-off-by: kubbot & kubecub <3293172751ysy@gmail.com>
2023-06-30 22:32:30 +08:00

29 lines
377 B
Go

package utils
import (
"github.com/bwmarrin/snowflake"
)
func init() {
var err error
idGenerator, err = snowflake.NewNode(getNodeNum())
if err != nil {
panic(err)
}
}
func getNodeNum() int64 {
return 1
}
var idGenerator *snowflake.Node
func GenID() string {
return idGenerator.Generate().String()
}
func GenIDs(count int) []string {
//impl
return []string{}
}