common

package
v1.1.1-0...-80e6439 Latest Latest
Warning

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

Go to latest
Published: May 3, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BOOLEAN_TYPE_TRUE_FALSE string = "true_false"
	BOOLEAN_TYPE_NUMERIC    string = "numeric"
	BOOLEAN_TYPE_YES_NO     string = "yes_no"
)

Boolean type constants

View Source
const (
	STRING_TYPE_HEX      string = "hex"
	STRING_TYPE_ASCII    string = "ascii"
	STRING_TYPE_BASE_64  string = "base64"
	STRING_TYPE_NUMBERS  string = "numbers"
	STRING_TYPE_LETTERS  string = "letters"
	STRING_TYPE_EXTENDED string = "extended"
)

String type constants

View Source
const (
	ID_TYPE_UUID4 = "uuidv4"
	ID_TYPE_UUID7 = "uuidv7"
	ID_TYPE_NANO  = "nanoid"
)
View Source
const DEFAULT_DELIMITER = " "
View Source
const DEFAULT_STRING_LENGTH = 20

Variables

View Source
var (
	ASCII_LETTERS = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")
	NUMBERS       = []rune("0123456789")
	HEX_DIGITS    = []rune("0123456789abcdef")
)

Possible string values

View Source
var CountFlag = &cli.IntFlag{
	Name:    "count",
	Aliases: []string{"c"},
	Value:   1,
	Usage:   "Number of random strings to display",
}
View Source
var Std = log.New(os.Stdout, "", 0)

Functions

func ColorStr

func ColorStr(str string, attributes ...color.Attribute) string

func Fail

func Fail(message any)

func ToArr

func ToArr[F, T any](from []F) []T

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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