#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 uuid generates and inspects UUIDs.
Health score 78/100, confidence 100/100.
| Latest version | v1.6.0 |
| Imported by | 113.5K packages |
| Stars | 6.1K |
| Forks | 422 |
| Last activity | 1 years ago |
| Latest release | v1.6.0 (2 years ago) |
| License | BSD-3-Clause |
| Known vuln records | 0 |
| Symbol | Kind | Synopsis |
|---|---|---|
| Domain | Type | type Domain byte |
| Domain.String | Method | func (d Domain) String() string |
| NullUUID | Type | type NullUUID struct{ ... } |
| NullUUID.MarshalBinary | Method | func (nu NullUUID) MarshalBinary() ([]byte, error) |
| NullUUID.MarshalJSON | Method | func (nu NullUUID) MarshalJSON() ([]byte, error) |
| NullUUID.MarshalText | Method | func (nu NullUUID) MarshalText() ([]byte, error) |
| NullUUID.Scan | Method | func (nu *NullUUID) Scan(value interface{}) error |
| NullUUID.UUID | Field | UUID UUID |
| NullUUID.UnmarshalBinary | Method | func (nu *NullUUID) UnmarshalBinary(data []byte) error |
| NullUUID.UnmarshalJSON | Method | func (nu *NullUUID) UnmarshalJSON(data []byte) error |
| NullUUID.UnmarshalText | Method | func (nu *NullUUID) UnmarshalText(data []byte) error |
| NullUUID.Valid | Field | Valid bool |
Package uuid provides implementations of the Universally Unique Identifier (UUID), as specified in RFC-4122 and the Peabody RFC Draft (revision 03).
Package uuid provides implementations of the Universally Unique Identifier (UUID), as specified in RFC-4122 and the Peabody RFC Draft (revision 03).
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()) }