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