this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

gulid: use crypto/rand

+2 -6
+2 -6
gulid/main.go
··· 1 1 package main 2 2 3 3 import ( 4 + "crypto/rand" 4 5 "fmt" 5 - "math/rand" 6 6 "os" 7 - "time" 8 7 9 8 "github.com/oklog/ulid/v2" 10 9 ) ··· 17 16 } 18 17 19 18 func realMain() error { 20 - entropy := rand.New(rand.NewSource(time.Now().UnixNano())) 21 - ms := ulid.Timestamp(time.Now()) 22 - 23 - u, err := ulid.New(ms, entropy) 19 + u, err := ulid.New(ulid.Now(), rand.Reader) 24 20 if err != nil { 25 21 return err 26 22 }