注意:“math/rand”包生成的随机数是容易预测的,安全等级要求较高的随机数请参考“crypto/rand”包,或等更新“Go密码学”相关的内容
什么是伪随机数
6.1.1 随机数种子
rand.Seed(int64)
纳秒: 十亿分之一秒
Go获取Unix纳秒: time.Now().UnixNano()
6.1.2 随机整数

6.1.3 随机小数

注意:“math/rand”包生成的随机数是容易预测的,安全等级要求较高的随机数请参考“crypto/rand”包,或等更新“Go密码学”相关的内容
什么是伪随机数
6.1.1 随机数种子
rand.Seed(int64)
纳秒: 十亿分之一秒
Go获取Unix纳秒: time.Now().UnixNano()
6.1.2 随机整数
6.1.3 随机小数