rand.go
package main
import (
"fmt"
"math/rand"
"time"
)
func main() {
rand.Seed(time.Now().UnixNano())
fmt.Println("random number is", rand.Intn(15))
}
$ go run rand.go
5
$ go run rand.go
12
$ go run rand.go
0
$