randompkg

package
v0.0.0-...-e6e2e8d Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package randompkg provides functionality gor generating random applications common items.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Currency

func Currency() string

Currency generates a random currency code.

func Email

func Email() string

Email generates a random email.

func Float64

func Float64() float64

Float64 is a shortcut for generating a random float between 0 and 1 using crypto/rand.

func FloatBetween

func FloatBetween(min, max float64) float64

FloatBetween generates a random decimal number between min and max rounded to 4 decimals.

func IntBetween

func IntBetween(min, max int) int32

IntBetween generates a random integer between min and max.

func Intn

func Intn(max int) int64

Intn is a shortcut for generating a random integer between 0 and max using crypto/rand.

func MoneyAmountBetween

func MoneyAmountBetween(min, max float64) string

MoneyAmountBetween generates a random amount of money between min and max rounded to 4 decimals.

func Owner

func Owner() string

Owner generates a random owner name.

func String

func String(n int) string

String generates a random string of length n.

Types

This section is empty.

Jump to

Keyboard shortcuts

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