diff --git a/go.mod b/go.mod index 47df3e8..baa2731 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,3 @@ module git.apinb.com/bsm-sdk/engine -go 1.21 +go 1.22 diff --git a/utils/random.go b/utils/random.go index a84416a..6a28462 100644 --- a/utils/random.go +++ b/utils/random.go @@ -1,11 +1,11 @@ package utils import ( - "math/rand" + "math/rand/v2" "time" ) -//随机生成字符串 +// 随机生成字符串 func RandomString(l int) string { str := "0123456789AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz" bytes := []byte(str) @@ -17,7 +17,7 @@ func RandomString(l int) string { return BytesToString(result) } -//随机生成纯字符串 +// 随机生成纯字符串 func RandomPureString(l int) string { str := "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz" bytes := []byte(str) @@ -29,7 +29,7 @@ func RandomPureString(l int) string { return BytesToString(result) } -//随机生成数字字符串 +// 随机生成数字字符串 func RandomNumber(l int) string { str := "0123456789" bytes := []byte(str)