1
0
mirror of https://github.com/charlienet/go-mixed.git synced 2025-07-18 08:32:40 +08:00

更新ID生成器

This commit is contained in:
2023-10-26 14:42:23 +08:00
parent 6647f96978
commit 0d124c0b79
17 changed files with 1079 additions and 150 deletions

View File

@ -0,0 +1,21 @@
package store_test
import (
"testing"
"github.com/charlienet/go-mixed/idGenerator/store"
)
func TestMemSmall(t *testing.T) {
s := store.NewMemStore(2)
for i := 0; i < 10; i++ {
t.Log(s.Assign(1, 9, 20))
}
}
func TestMemBig(t *testing.T) {
s := store.NewMemStore(2)
for i := 0; i < 10; i++ {
t.Log(s.Assign(0, 99, 18))
}
}