util

package
Version: v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package util provides various helper functions.

Index

Constants

View Source
const (
	AsciiNum      = "0123456789"
	AsciiSpecials = "~=+%^*/()[]{}/!@#$?|"
	AsciiUpper    = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
	AsciiLower    = "abcdefghijklmnopqrstuvwxyz"
	AsciiAlpha    = AsciiUpper + AsciiLower
	AsciiAlphaNum = AsciiAlpha + AsciiNum
	AsciiFull     = AsciiAlphaNum + AsciiSpecials
)

Variables

This section is empty.

Functions

func RandAscii

func RandAscii(length int) string

RandAscii generates a random string using full ASCII alphabet.

func RandAsciiAlpha

func RandAsciiAlpha(length int) string

RandAsciiAlpha generates a random string using only ASCII letters.

func RandAsciiAlphaNum

func RandAsciiAlphaNum(length int) string

RandAsciiAlphaNum generates a random string using ASCII letters and numbers.

func RandStr

func RandStr(alphabet []rune, length int) string

RandStr generates a random string,

Types

This section is empty.

Source Files

Jump to

Keyboard shortcuts

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