Golang 生成随机数

package main  
  
import (  
    "fmt"  
    "math/rand"  
    "time"  
)  
  
func main() {  
    rand.Seed(time.Now().UnixNano())  
    for i := 0; i < 10; i++ {  
     x :
= rand.Intn(100) fmt.Println(x) } }
原文地址:https://www.cnblogs.com/libertycode/p/5914697.html