add go example

This commit is contained in:
Antoine 2019-01-29 17:42:38 +01:00
parent a327673cd4
commit 4ada72d89c
1 changed files with 23 additions and 0 deletions

23
example.go Normal file
View File

@ -0,0 +1,23 @@
package main
import (
"fmt"
//mathRand "math/rand"
cryptoRand "crypto/rand"
"math/big"
"time"
)
func main() {
fmt.Println("Hello, playground", time.Now())
nBig, err := cryptoRand.Int(cryptoRand.Reader, big.NewInt(27))
if err != nil {
panic(err)
}
n := nBig.Int64()
//b := []byte{0}
//r := cryptoRand.Reader.Read(b)
fmt.Println("r", n)
//fmt.Println("Random", mathRand.Seed(r).Intn(9))
}