Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

autoinc Go license codecov PkgGoDev

autoinc 提供了一个简单的 ID 自增功能

ai := autoinc.New(0, 1, 1)
ctx, cancel = context.WithCancel(context.Background())
defer cancel()
go ai.Serve(ctx)

for i:=0; i<10; i++ {
    fmt.Println(ai.MustID())
}

安装

go get github.com/issue9/autoinc/v2

版权

本项目采用 MIT 开源授权许可证,完整的授权说明可在 LICENSE 文件中找到。