go-tour/packages.go

15 lines
221 B
Go
Raw Permalink Normal View History

2020-02-05 03:44:36 +00:00
package main
import (
"fmt"
"math/rand"
"time"
)
func main() {
seed := time.Now().UnixNano()
rand.Seed(seed)
fmt.Println("Seed: ", seed)
fmt.Println("My favorite number is", rand.Intn(10))
}