parent
f44f08b326
commit
5ed27d4cdc
@ -1,5 +1,5 @@
|
|||||||
package go_library
|
package go_library
|
||||||
|
|
||||||
func Version() string {
|
func Version() string {
|
||||||
return "v1.0.24"
|
return "v1.0.26"
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
package uuid
|
package gouuid
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
)
|
)
|
||||||
|
|
||||||
// GenUUID 获取唯一ID
|
// GetUuId 获取唯一ID
|
||||||
func GenUUID() string {
|
func GetUuId() string {
|
||||||
u, _ := uuid.NewRandom()
|
u, _ := uuid.NewRandom()
|
||||||
return u.String()
|
return u.String()
|
||||||
}
|
}
|
@ -0,0 +1,11 @@
|
|||||||
|
package gouuid_test
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"github.com/dtapps/go-library/utils/gouuid"
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestGetUuId(t *testing.T) {
|
||||||
|
fmt.Println(gouuid.GetUuId())
|
||||||
|
}
|
@ -1,11 +0,0 @@
|
|||||||
package uuid_test
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
"github.com/dtapps/go-library/utils/uuid"
|
|
||||||
"testing"
|
|
||||||
)
|
|
||||||
|
|
||||||
func TestName(t *testing.T) {
|
|
||||||
fmt.Println(uuid.GenUUID())
|
|
||||||
}
|
|
Loading…
Reference in new issue