Skip to content

pharosnet/auid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

  • AUID is a id generator base on UUID for Go, and it itself is completely stable.
  • AUID = xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx-xxxxxxxxxxx
  • Support pool.
  • Support UUIDs.
  • Thread safety.

Example

The simplest way:

package main

import (
	"github.com/pharosnet/auid"
	"fmt"
)

func main() {
    fmt.Println(auid.NewAuid())
}

Pool:

package main

import (
	"github.com/pharosnet/auid"
	"fmt"
)

func main() {
    fmt.Println(auid.NewAuidWithPool())
}