add uuid v7

This commit is contained in:
2025-03-12 17:10:04 +08:00
parent a4c6acf56d
commit 4fe311b722
3 changed files with 6 additions and 16 deletions

View File

@@ -1,9 +1,14 @@
package utils
import (
"github.com/google/uuid"
ulid "github.com/oklog/ulid/v2"
)
func UUID() string {
return uuid.Must(uuid.NewV7()).String()
}
// remove nanoid,uuid,replace to ulid
func ULID() string {
return ulid.Make().String()