snapshot of https://github.com/ThreeDotsLabs/watermill.git (master, 2026-09-15; blobs > 131072B omitted)
Some checks failed
master / ci (push) Failing after 0s

This commit is contained in:
upstream-mirror
2026-09-15 21:27:46 +05:00
commit ce933d1277
538 changed files with 46504 additions and 0 deletions

24
uuid.go Normal file
View File

@@ -0,0 +1,24 @@
package watermill
import (
"crypto/rand"
"github.com/google/uuid"
"github.com/lithammer/shortuuid/v3"
"github.com/oklog/ulid"
)
// NewUUID returns a new UUID Version 4.
func NewUUID() string {
return uuid.New().String()
}
// NewShortUUID returns a new short UUID.
func NewShortUUID() string {
return shortuuid.New()
}
// NewULID returns a new ULID.
func NewULID() string {
return ulid.MustNew(ulid.Now(), rand.Reader).String()
}