Skip to content
/ IDGen Public

Generates url safe lexically sorted universally unique ids with a prefix in go

License

Notifications You must be signed in to change notification settings

Appointy/IDGen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

idgen

Go Report Card Build Status Coverage License: MIT

Generates url safe lexically sorted universally unique ids with a prefix in go. Inspired from Stripe.

Usage

package main

import (
    "fmt"

    "github.com/appointy/idgen"
)

func main()  {
    id := idgen.New("cus")
    fmt.Println(id)
    // Output: cus_0000XSNJG0MQJHBF4QX1EFD6Y3
}

Depends on

oklog/ulid