Golang math/rand.Uint32() function example
package math/rand
Golang math/rand.Uint32() function usage example
package main
import (
"fmt"
"math/rand"
"time"
)
func main() {
n := 10
i := 0
r := rand.New(rand.NewSource(time.Now().UnixNano()))
for i < n {
x := r.Uint32()
fmt.Println(x)
i += 1
}
}
Reference :
Advertisement
Something interesting
Tutorials
+8.3k Golang : Auto-generate reply email with text/template package
+9.7k PHP : Get coordinates latitude/longitude from string
+30k Golang : Get time.Duration in year, month, week or day
+12.1k Golang : Sort and reverse sort a slice of runes
+8.8k Golang : On lambda, anonymous, inline functions and function literals
+6.1k Golang : Grab news article text and use NLP to get each paragraph's sentences
+10.6k Golang : Resolve domain name to IP4 and IP6 addresses.
+22.7k Golang : Strings to lowercase and uppercase example
+12k Golang : Convert a rune to unicode style string \u
+11.6k Swift : Convert (cast) Float to String
+51.1k Golang : Disable security check for HTTPS(SSL) with bad or expired certificate
+6.7k Golang : Skip or discard items of non-interest when iterating example