NUID 是一个高性能的唯一标识生成库,使用 GO 语言开发。
示例代码:
<pre class="brush:cpp ;toolbar: true; auto-links: false;">// 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()</pre>