diff --git a/helper/number/number.go b/helper/number/number.go index 7198d30..9e55f0a 100644 --- a/helper/number/number.go +++ b/helper/number/number.go @@ -1,16 +1,12 @@ +// Package number +// 使用随机数时需要先 调用 rand.seed()函数 package number import ( "fmt" "math/rand" - "time" ) -var _ = func() any { - rand.Seed(time.Now().UnixNano()) - return nil -}() - type IntNumber interface { ~int | ~int64 | ~int32 | ~int8 | ~int16 | ~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64