Small script to generate a random integer, between 1 and 100, in Golang, the Google programming language.
package main import ( "fmt" "math/rand" "time" ) func random(min, max int) int { rand.Seed(time.Now().UTC().UnixNano()) return rand.Intn(max-min) + min } func main() { var myrand int myrand = random(1, 101) fmt.Println(myrand) }