#1 uuid
Package uuid provides implementations of the Universally Unique Identifier (UUID), as specified in RFC-4122 and the Peabody RFC Draft (revision 03).
Package nanoid provides fast and convenient unique string generator.
Health score 49/100, confidence 80/100.
| Latest version | v1.0.8 |
| Imported by | 39 packages |
| Stars | 0 |
| Forks | 0 |
| Last activity | 5 years ago |
| Latest release | Unknown |
| License | Unknown |
| Known vuln records | 0 |
| Symbol | Kind | Synopsis |
|---|---|---|
| BytesGenerator | Type | type BytesGenerator func(step int) ([]byte, error) |
| DefaultAlphabet | Constant | const DefaultAlphabet |
| DefaultSize | Constant | const DefaultSize |
| Format | Function | func Format(generateRandomBuffer BytesGenerator, alphabet string, size int) (string, error) |
| Generate | Function | func Generate(alphabet string, size int) (string, error) |
| Must | Function | func Must(id string, err error) string |
| MustFormat | Function | func MustFormat(generateRandomBuffer BytesGenerator, alphabet string, size int) string |
| MustGenerate | Function | func MustGenerate(alphabet string, size int) string |
| New | Function | func New() string |
Package uuid provides implementations of the Universally Unique Identifier (UUID), as specified in RFC-4122 and the Peabody RFC Draft (revision 03).
Package uuid generates and inspects UUIDs.
Generate, encode, and decode UUIDs v1 with fast or cryptographic-quality random node identifier.
Package uuid provides implementations of the Universally Unique Identifier (UUID), as specified in RFC-4122 and the Peabody RFC Draft (revision 03).
Package uuid generates and inspects UUIDs.
Generate, encode, and decode UUIDs v1 with fast or cryptographic-quality random node identifier.
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()) }