diff --git a/snowflake.go b/snowflake.go index fa6b034..4ae8db2 100644 --- a/snowflake.go +++ b/snowflake.go @@ -51,7 +51,7 @@ func NewNode(node int64) (*Node, error) { } // Generate creates and returns a unique snowflake ID -func (n *Node) Generate() (ID, error) { +func (n *Node) Generate() ID { n.Lock() defer n.Unlock() @@ -75,7 +75,7 @@ func (n *Node) Generate() (ID, error) { return ID((now-Epoch)<