mirror of
https://github.com/godruoyi/go-snowflake.git
synced 2026-01-08 04:55:15 +00:00
Compare commits
2 Commits
v0.0.2-alp
...
v0.0.1-bet
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
056fce86b8 | ||
|
|
ad2188ad52 |
2
.github/FUNDING.yml
vendored
Normal file
2
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
# These are supported funding model platforms
|
||||
custom: ["https://images.godruoyi.com/wechat.png"]
|
||||
@@ -16,12 +16,6 @@ func TestID(t *testing.T) {
|
||||
t.Error("The snowflake should't < 0.")
|
||||
}
|
||||
|
||||
id2 := 1644633515267981312
|
||||
df := 392111185853
|
||||
if id2 != ((df << (snowflake.MachineIDLength + snowflake.SequenceLength)) | 0 | 0) {
|
||||
t.Error("Create snowflake should be equal 1644633515267981312")
|
||||
}
|
||||
|
||||
mp := make(map[uint64]bool)
|
||||
for i := 0; i < 100000; i++ {
|
||||
id, e := snowflake.NextID()
|
||||
|
||||
Reference in New Issue
Block a user