Browse Source

auto commit

tags/v1.0.0
yitter 3 years ago
parent
commit
93da5e850d
2 changed files with 6 additions and 6 deletions
  1. +5
    -5
      Go/README.md
  2. +1
    -1
      Go/source/go.mod

+ 5
- 5
Go/README.md View File

@@ -27,11 +27,11 @@ require github.com/yitter/idgenerator-go v1.2.0
``` ```
// 定义参数 // 定义参数
var options = idgen.NewIdGeneratorOptions(1)
options.WorkerId = 1
options.WorkerIdBitLength = 6
options.SeqBitLength = 6
// ...
var options = idgen.NewIdGeneratorOptions(1) // 构造函数输入 WorkerId
// options.WorkerId = 1
// options.WorkerIdBitLength = 6
// options.SeqBitLength = 6
// ... 以上参数一般不需要设置,系统有默认值
idgen.SetIdGenerator(options) idgen.SetIdGenerator(options)
// 调用方法生成Id // 调用方法生成Id


+ 1
- 1
Go/source/go.mod View File

@@ -1,5 +1,5 @@
module yitidgen module yitidgen


go 1.14
go 1.16


require github.com/go-redis/redis/v8 v8.8.0 // indirect require github.com/go-redis/redis/v8 v8.8.0 // indirect

Loading…
Cancel
Save