package main import ( "fmt" "math/rand" "strconv" "time" ) func random(min, max int) int { rand.Seed(time.Now().UTC().UnixNano()) return rand.Intn(max-min) + min } func main() { myrand := random(1, 91) fmt.Println(strconv.Itoa(myrand)) }
package main import ( "fmt" "math/rand" "strconv" "time" ) func random(min, max int) int { rand.Seed(time.Now().UTC().UnixNano()) return rand.Intn(max-min) + min } func main() { myrand := random(1, 91) fmt.Println(strconv.Itoa(myrand)) }