NUID Go 唯一标识生成库 NUID

agolangf2016-02-24 16:00:00 • 3124 次点击    
这是一个分享于 2016-02-24 16:00:00 的项目,其中的信息可能已经有所发展或是发生改变。

NUID 是一个高性能的唯一标识生成库,使用 GO 语言开发。

示例代码:

// Utilize the global locked instance
nuid := nuid.Next()

// Create an instance, these are not locked.
n := nuid.New()
nuid = n.Next()

// Generate a new crypto/rand seeded prefix.
// Generally not needed, happens automatically.
n.RandomizePrefix()

NATS Unique IdentifiersRead More

Latest commit to the master branch on 2-13-2025
Download as zip
授权协议:
MIT
开发语言:
Google Go 查看源码»
操作系统:
跨平台
3124 次点击  ∙  1 赞  
加入收藏 微博
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传