Use nodeShift instead of 12.
This commit is contained in:
parent
94a47d42a7
commit
00c61c48d0
@ -117,7 +117,7 @@ func (f ID) Time() int64 {
|
||||
|
||||
// Node returns an int64 of the snowflake ID node number
|
||||
func (f ID) Node() int64 {
|
||||
return int64(f) & 0x00000000003FF000 >> 12
|
||||
return int64(f) & 0x00000000003FF000 >> nodeShift
|
||||
}
|
||||
|
||||
// Step returns an int64 of the snowflake step (or sequence) number
|
||||
|
Loading…
x
Reference in New Issue
Block a user