isotope

package
v0.0.0-...-d641761 Latest Latest
Warning

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

Go to latest
Published: May 31, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package isotope is a Go utility library that generates randomized data.

Index

Constants

View Source
const (
	// CharsLowerAlpha includes all lowercase alphabets.
	CharsLowerAlpha = "abcdefghijklmnopqrstuvwxyz"
	// CharsUpperAlpha includes all uppercase alphabets.
	CharsUpperAlpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
	// CharsUpperAlpha includes all numeric characters.
	CharsNumeric = "0123456789"
)

Variables

This section is empty.

Functions

func Email

func Email() string

Email generates a randomized email addresss.

func Int64

func Int64(maxInt int64) int64

Int64 generates a random integer from the interval [0, max). This is not cryptographically secure.

func Password

func Password() string

Password generates a randomized password.

func SecureInt64

func SecureInt64(maxInt int64) (int64, error)

SecureInt64 generates a cryptographically secure random integer from the interval [0, max).

func SecureString

func SecureString(
	n int,
	allowLowerAlpha bool,
	allowUpperAlpha bool,
	allowNumeric bool,
) (string, error)

SecureString generates a cryptographically secure random string of given length. allowLowerAlpha, allowUpperAlpha, and allowNumeric can be used to include/exclude lowercase, uppercase, and numeric characters respectively.

func String

func String(
	n int,
	allowLowerAlpha bool,
	allowUpperAlpha bool,
	allowNumeric bool,
) string

String generates random string of given length. allowLowerAlpha, allowUpperAlpha, and allowNumeric can be used to include/exclude lowercase, uppercase, and numeric characters respectively. This is not cryptographically secure.

Types

This section is empty.

Jump to

Keyboard shortcuts

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