/sue

"Simple Unique Epoch" ID Generator

Primary LanguageGoMIT LicenseMIT

Simple Unique Epoch

"Simple Unique Epoch" (SUE) is a simple id generator based on UNIX epoch time.

Install

  go get github.com/chapani/sue

Usage

// a unique id based on microseconds
microId := sue.New()

// sample output: "3L4CTbdm"
fmt.Println(microId)



// a unique id based on nanoseconds
nanoId := sue.New2()

// sample output: "rrnlFXBWL"
fmt.Println(nanoId)