mrand: github.com/mkmueller/mrand Index | Files

package mrand

import "github.com/mkmueller/mrand"

Package mrand is a simple wrapper for math/rand.

Index

Package Files

mrand.go

Constants

const (
    MaxInt32 = 1<<31 - 1
    MaxInt64 = 1<<63 - 1
)

func Int Uses

func Int(a ...int) int

Int returns a random non-negative 32 bit integer.

Example:
rnd := mrand.Int()        // return a random int between 0 and MaxInt32 inclusive
rnd := mrand.Int(90,99)   // return a random int between 90 and 99 inclusive

func Int64 Uses

func Int64(a ...int64) int64

Int64 returns a random non-negative 64 bit integer.

Example:
rnd := mrand.Int64()        // return a random int64 between 0 and MaxInt64 inclusive
rnd := mrand.Int64(90,99)   // return a random int64 between 90 and 99 inclusive

func String Uses

func String(n int) string

String returns a random alpha-numeric string of length n.

Example:
str := mrand.String(64)

Package mrand imports 2 packages (graph). Updated 2017-11-22. Refresh now. Tools for package owners.