random

package
v0.0.0-...-09f3b15 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bin

func Bin(size int) []byte

Bin Generate a random binary.

func Bool

func Bool() bool

Bool Generate a random true or false.

func Json

func Json(sizeMin, sizeMax uint) []byte

Json Generate a random JSON file.

func ObjectC

func ObjectC(config *OCConfig)

ObjectC Generate random Objective-C code.

func Png

func Png() []byte

Png Generate a random PNG file.

func String

func String(length uint) string

String generate a random English string containing both lowercase and uppercase letters (a-z, A-Z)

func UInt

func UInt(min, max uint) uint

UInt Generate a random non-negative integer within the range [min, max).

Types

type OCConfig

type OCConfig struct {
	RootDir   string // Generate file root directory.
	FileCount int    // Number of files to generate.
	Seed      int64  // Random seed.
}

Jump to

Keyboard shortcuts

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