workers

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 20, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Date

func Date() time.Time

Date will generate a random time.Time struct

func DateRange

func DateRange(start, end time.Time) time.Time

DateRange will generate a random time.Time struct between a start and end date

func Day

func Day() int

Day will generate a random day between 1 - 31

func Digit

func Digit() string

Digit will generate a single ASCII digit

func Float32

func Float32() float32

Float32 will generate a random float32 value

func Float32Range

func Float32Range(min, max float32) float32

Float32Range will generate a random float32 value between min and max

func Float64

func Float64() float64

Float64 will generate a random float64 value

func Float64Range

func Float64Range(min, max float64) float64

Float64Range will generate a random float64 value between min and max

func Hour

func Hour() int

Hour will generate a random hour - in military time

func Int16

func Int16() int16

Int16 will generate a random int16 value

func Int32

func Int32() int32

Int32 will generate a random int32 value

func Int64

func Int64() int64

Int64 will generate a random int64 value

func Int8

func Int8() int8

Int8 will generate a random Int8 value

func Letter

func Letter() string

Letter will generate a single random lower case ASCII letter

func Lexify

func Lexify(str string) string

Lexify will replace ? will random generated letters

func Minute

func Minute() int

Minute will generate a random minute

func Month

func Month() string

Month will generate a random month string

func NanoSecond

func NanoSecond() int

NanoSecond will generate a random nano second

func Number

func Number(min int, max int) int

Number will generate a random number between given min And max

func Numerify

func Numerify(str string) string

Numerify will replace # with random numerical values

func Password

func Password(lower bool, upper bool, numeric bool, special bool, space bool, num int) string

Password will generate a random password Minimum number length of 5 if less than

func RandString

func RandString(a []string) string

RandString will take in a slice of string and return a randomly selected value

func Second

func Second() int

Second will generate a random second

func Seed

func Seed(seed int64)

Seed random. Setting seed to 0 will use time.Now().UnixNano()

func ShuffleInts

func ShuffleInts(a []int)

ShuffleInts will randomize a slice of ints

func ShuffleStrings

func ShuffleStrings(a []string)

ShuffleStrings will randomize a slice of strings

func UUID

func UUID() string

UUID (version 4) will generate a random unique identifier based upon random nunbers Format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

func Uint16

func Uint16() uint16

Uint16 will generate a random uint16 value

func Uint32

func Uint32() uint32

Uint32 will generate a random uint32 value

func Uint64

func Uint64() uint64

Uint64 will generate a random uint64 value

func Uint8

func Uint8() uint8

Uint8 will generate a random uint8 value

func WeekDay

func WeekDay() string

WeekDay will generate a random weekday string (Monday-Sunday)

func Year

func Year() int

Year will generate a random year between 1900 - current year

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL