feat(rands): initial implementation

This commit is contained in:
2021-01-20 02:57:34 +00:00
parent 3ddcfd415c
commit 597fe535d3
18 changed files with 1603 additions and 1 deletions

17
ints_example_test.go Normal file
View File

@@ -0,0 +1,17 @@
package rands_test
import (
"fmt"
"github.com/jimeh/rands"
)
func ExampleInt() {
n, _ := rands.Int(2147483647)
fmt.Printf("%d\n", n) // => 1334400235
}
func ExampleInt64() {
n, _ := rands.Int64(int64(9223372036854775807))
fmt.Printf("%d\n", n) // => 8256935979116161233
}