https://github.com/gowebprod/uuid7
Go UUIDv7 implementation
https://github.com/gowebprod/uuid7
Last synced: about 1 year ago
JSON representation
Go UUIDv7 implementation
- Host: GitHub
- URL: https://github.com/gowebprod/uuid7
- Owner: GoWebProd
- Created: 2022-04-18T18:30:56.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-12-16T13:17:43.000Z (over 1 year ago)
- Last Synced: 2025-03-18T21:52:29.478Z (over 1 year ago)
- Language: Go
- Homepage:
- Size: 11.7 KB
- Stars: 24
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# uuid7
Documentation:
https://datatracker.ietf.org/doc/html/draft-peabody-dispatch-new-uuid-format-03
## Example
```go
package main
import (
"log"
"github.com/GoWebProd/uuid7"
)
func main() {
u := uuid7.New()
log.Println(u.Next().String())
}
```
## Benchmark
```
goos: linux
goarch: amd64
pkg: github.com/GoWebProd/uuid7
cpu: Intel Xeon Processor (Skylake, IBRS)
BenchmarkNext-8 18314782 65.94 ns/op 0 B/op 0 allocs/op
BenchmarkString-8 17735802 67.66 ns/op 48 B/op 1 allocs/op
BenchmarkParse-8 14948330 78.38 ns/op 0 B/op 0 allocs/op
PASS
ok github.com/GoWebProd/uuid7 3.812s
```