random

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2021 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StringGenerator

type StringGenerator struct {
	// contains filtered or unexported fields
}

StringGenerator holds the parameters required for generating strings randomly.

func NewStringGenerator

func NewStringGenerator(base string) *StringGenerator

NewStringGenerator returns a new StringGenerator with base as its character pool.

func (*StringGenerator) Generate

func (sg *StringGenerator) Generate(length int) *string

Generate (very efficiently) generates a string of length characters. Credit to: https://stackoverflow.com/a/31832326

Jump to

Keyboard shortcuts

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