package main import ( "fmt" "math/rand" "time" ) func main() { rand.Seed(time.Now().UnixNano()) var num = rand.Intn(10) + 1 fmt.Println(num) num = rand.Intn(10) + 1 fmt.Println(num) }