Skip to content

Latest commit

 

History

History
31 lines (22 loc) · 965 Bytes

README.md

File metadata and controls

31 lines (22 loc) · 965 Bytes

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