parent
f44f08b326
commit
5ed27d4cdc
@ -1,5 +1,5 @@
|
||||
package go_library
|
||||
|
||||
func Version() string {
|
||||
return "v1.0.24"
|
||||
return "v1.0.26"
|
||||
}
|
||||
|
@ -1,11 +1,11 @@
|
||||
package uuid
|
||||
package gouuid
|
||||
|
||||
import (
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
// GenUUID 获取唯一ID
|
||||
func GenUUID() string {
|
||||
// GetUuId 获取唯一ID
|
||||
func GetUuId() string {
|
||||
u, _ := uuid.NewRandom()
|
||||
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