random

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2019 License: MIT Imports: 8 Imported by: 2

Documentation

Index

Constants

View Source
const (
	ModeALL           = iota // ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_
	ModeNoLower              // ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_
	ModeNoUpper              // abcdefghijklmnopqrstuvwxyz0123456789-_
	ModeNoNumber             // ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_
	ModeNoLowerNumber        // ABCDEFGHIJKLMNOPQRSTUVWXYZ-_
	ModeNoUpperNumber        // abcdefghijklmnopqrstuvwxyz-_
	ModeNoLine               // ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
	ModeNoLowerLine          // ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
	ModeNoUpperLine          // abcdefghijklmnopqrstuvwxyz0123456789
	ModeOnlyUpper            // ABCDEFGHIJKLMNOPQRSTUVWXYZ
	ModeOnlyLower            // abcdefghijklmnopqrstuvwxyz
	ModeOnlyNumber           // 0123456789
	ModeHexUpper             // 0123456789ABCDEF
	ModeHexLower             // 0123456789abcdef

	ModeLimit
)

Variables

View Source
var (
	ENoUUID       = errors.New("Unable read uuid")
	ENoUUIDKernel = errors.New("Unable read uuid from kernel")
)
View Source
var (
	ENoResult = errors.New("Unable read result")
)

Functions

func NewRandomString added in v0.0.3

func NewRandomString(mode, max int) (result string)

func NewRandomUUID added in v0.0.3

func NewRandomUUID() string

func NewRandomUUIDByKernel

func NewRandomUUIDByKernel() string

Types

This section is empty.

Jump to

Keyboard shortcuts

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