This commit is contained in:
yanweidong 2024-06-14 17:23:24 +08:00
parent 2d40fc38ce
commit 6cac60f15e
1 changed files with 5 additions and 0 deletions

View File

@ -5,6 +5,7 @@ import (
"github.com/google/uuid"
"github.com/jaevor/go-nanoid"
ulid "github.com/oklog/ulid/v2"
)
func NanoID() string {
@ -24,3 +25,7 @@ func NanoIDInt() (id int64, err error) {
func UUID() string {
return uuid.NewString()
}
func ULID() string {
return ulid.Make().String()
}