1
0
mirror of synced 2025-12-29 00:17:57 +08:00

auto commit

This commit is contained in:
yitter
2021-04-05 12:17:28 +08:00
parent 1bcf08e737
commit fee6d7df2f

View File

@@ -26,7 +26,7 @@ go get -u -v github.com/yitter/idgenerator-go
```
// 创建 IdGeneratorOptions 对象,构造函数输入 WorkerId
var options = idgen.NewIdGeneratorOptions(1)
// options.WorkerIdBitLength = 10; // WorkerIdBitLength 默认值6支持的 WorkerId 最大值为2^6-1若 WorkerId 超过64可设置更大的 WorkerIdBitLength
// options.WorkerIdBitLength = 10 // WorkerIdBitLength 默认值6支持的 WorkerId 最大值为2^6-1若 WorkerId 超过64可设置更大的 WorkerIdBitLength
// ...... 其它参数设置参考 IdGeneratorOptions 定义,一般来说,只要再设置 WorkerIdBitLength (决定 WorkerId 的最大值)。
// 保存参数(必须的操作,否则以上设置都不能生效):