|
@@ -28,6 +28,19 @@ const (
|
|
|
tmp = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ12345678900"
|
|
|
)
|
|
|
|
|
|
+var (
|
|
|
+ // int 强制转换
|
|
|
+ Int = InterfaceToInt
|
|
|
+ Int64 = InterfaceToInt64
|
|
|
+ Int32 = InterfaceToInt32
|
|
|
+ // float 强制转换
|
|
|
+ Float64 = InterfaceToFloat64
|
|
|
+ // string 强制转换
|
|
|
+ Str = InterfaceToStr
|
|
|
+ // bool 强制转换
|
|
|
+ Bool = InterfaceToBool
|
|
|
+)
|
|
|
+
|
|
|
func Uuid(length int) string {
|
|
|
ret := []string{}
|
|
|
r := mathRand.New(mathRand.NewSource(time.Now().UnixNano()))
|