#1 Google UUID
Package uuid generates and inspects UUIDs.
Package uuid provides implementations of the Universally Unique Identifier (UUID), as specified in RFC-4122 and the Peabody RFC Draft (revision 03).
Health score 93/100, confidence 100/100.
| Latest version | v4.4.0+incompatible |
| Imported by | 22.7K packages |
| Stars | 1.8K |
| Forks | 124 |
| Last activity | 16 days ago |
| Latest release | v5.4.0 (7 months ago) |
| License | MIT |
| Known vuln records | 0 |
| Symbol | Kind | Synopsis |
|---|---|---|
| EpochFunc | Type | type EpochFunc func() time.Time |
| Gen | Type | type Gen struct{} |
| Gen.NewV1 | Method | func (g *Gen) NewV1() (UUID, error) |
| Gen.NewV3 | Method | func (g *Gen) NewV3(ns UUID, name string) UUID |
| Gen.NewV4 | Method | func (g *Gen) NewV4() (UUID, error) |
| Gen.NewV5 | Method | func (g *Gen) NewV5(ns UUID, name string) UUID |
| Gen.NewV6 | Method | func (g *Gen) NewV6() (UUID, error) |
| Gen.NewV7 | Method | func (g *Gen) NewV7() (UUID, error) |
| NewGen | Function | func NewGen() *Gen |
| NewGenWithHWAF | Function | func NewGenWithHWAF(hwaf HWAddrFunc) *Gen |
| NewGenWithOptions | Function | func NewGenWithOptions(opts ...GenOption) *Gen |
| GenOption | Type | type GenOption func(*Gen) |
Package uuid generates and inspects UUIDs.
Generate, encode, and decode UUIDs v1 with fast or cryptographic-quality random node identifier.
Package nanoid provides fast and convenient unique string generator.
K-Sortable Globally Unique IDs
Package violetear - HTTP router Basic example: package main import ( "fmt" "github.com/nbari/violetear" "log" "net/http" ) func catchAll(w http.ResponseWriter, r *http.Request) { fmt.Fprintf(w, r.URL.Path[1:]) } func helloWorld(w http.ResponseWriter, r *http.Request) { fmt.Fprintf(w, r.URL.Path[1:]) } func handleUUID(w http.ResponseWriter, r *http.Request) { fmt.Fprintf(w, r.URL.Path[1:]) } func main() { router := violetear.New() router.LogRequests = true router.RequestID = "REQUEST_LOG_ID" router.AddRegex(":uuid", `[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}`) router.HandleFunc("*", catchAll) router.HandleFunc("/hello", helloWorld, "GET,HEAD") router.HandleFunc("/root/:uuid/item", handleUUID, "POST,PUT") srv := &http.Server{ Addr: ":8080", Handler: router, ReadTimeout: 5 * time.Second, WriteTimeout: 7 * time.Second, MaxHeaderBytes: 1 << 20, } log.Fatal(srv.ListenAndServe()) }