rand

package
v0.0.0-...-385f941 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2018 License: Apache-2.0 Imports: 11 Imported by: 21

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateMaskBytesString

func GenerateMaskBytesString(n int) string

GenerateMaskBytesString is exported return n length rand string.

func GenerateRandomID

func GenerateRandomID() string

GenerateRandomID returns a 32-bit unique id

func IsShortID

func IsShortID(id string) bool

func TruncateID

func TruncateID(id string) string

func UUID

func UUID(random bool) string

NewUUID returns a uuid string format:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

func UUIDFile

func UUIDFile(fpath string) (string, error)

WriteUUIDToFile return a uuid string and write to file

Types

This section is empty.

Jump to

Keyboard shortcuts

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