mirror of
https://gitee.com/johng/gf
synced 2026-06-07 02:12:11 +08:00
improve snowflake number generating for package guid
This commit is contained in:
@ -37,7 +37,7 @@ func init() {
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
MachineId = uint16(ip[2])<<8 + uint16(ip[3])
|
||||
MachineId = uint16(ip[2])<<8 | uint16(ip[3])
|
||||
}
|
||||
|
||||
// I creates and returns an uint64 id which using improved SnowFlake algorithm.
|
||||
|
||||
Reference in New Issue
Block a user