add ULID
This commit is contained in:
parent
2d40fc38ce
commit
6cac60f15e
|
@ -5,6 +5,7 @@ import (
|
||||||
|
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"github.com/jaevor/go-nanoid"
|
"github.com/jaevor/go-nanoid"
|
||||||
|
ulid "github.com/oklog/ulid/v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
func NanoID() string {
|
func NanoID() string {
|
||||||
|
@ -24,3 +25,7 @@ func NanoIDInt() (id int64, err error) {
|
||||||
func UUID() string {
|
func UUID() string {
|
||||||
return uuid.NewString()
|
return uuid.NewString()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func ULID() string {
|
||||||
|
return ulid.Make().String()
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue