util

package
v0.0.0-...-53ae7c8 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// LowerLetters is the list of lowercase letters.
	LowerLetters = "abcdefghijklmnopqrstuvwxyz"

	// UpperLetters is the list of uppercase letters.
	UpperLetters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

	// Digits is the list of permitted digits.
	Digits = "0123456789"

	// Symbols is the list of symbols.
	Symbols = "~!@#$%^&*()_+`-={}|[]\\:\"<>?,./"

	// CharacterSet set containing all types of characters
	CharacterSet = LowerLetters + UpperLetters + Digits + Symbols
	// CharacterSetNoSymbols set containing only letters and digits
	CharacterSetNoSymbols = LowerLetters + UpperLetters + Digits

	// BoldBlue print text in bold blue
	BoldBlue = "\033[1m\033[34m"
	// Reset reset text formating
	Reset = "\033[0m"
)

Variables

This section is empty.

Functions

func RandomString

func RandomString(n int, symbols bool) (string, error)

RandomString returns a random string of of the given length

func TmpFile

func TmpFile() (string, error)

TmpFile generates the path to a new temporary file

func YesNo

func YesNo(msg string) bool

YesNo simple Yes or No dialogue

Types

This section is empty.

Jump to

Keyboard shortcuts

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