id

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: May 7, 2025 License: MPL-2.0 Imports: 2 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenSafeUniqueSlug

func GenSafeUniqueSlug(slug string) string

GenSafeUniqueSlug generatees a reasonably unique random slug from the given original slug. It's "safe" because it uses 0-9 b-z excluding vowels.

func Generate62RandomString added in v1.4.0

func Generate62RandomString(l int) string

Generate62RandomString creates a random string with the given length consisting of characters in [A-Za-z0-9].

func GenerateFriendlyRandomString added in v1.4.0

func GenerateFriendlyRandomString(l int) string

GenerateFriendlyRandomString creates a random string of characters with the given length consisting of characters in [a-z0-9].

func GenerateRandomString added in v1.3.0

func GenerateRandomString(dictionary string, l int) string

GenerateRandomString creates a random string of characters of the given length from the given dictionary of possible characters.

This example generates a hexadecimal string 6 characters long:

GenerateRandomString("0123456789abcdef", 6)

Types

This section is empty.

Jump to

Keyboard shortcuts

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