Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureUnique ¶
func EnsureUnique(ctx context.Context, baseSlug, contentType string, checker SlugChecker) (string, error)
EnsureUnique ensures the slug is unique by appending a numeric suffix if needed
func Generate ¶
Generate creates a URL-safe slug from the input string It transliterates Cyrillic to Latin, converts to lowercase, and replaces spaces with hyphens
func MachineName ¶
MachineName - a machine name ([a-z][a-z0-9_]*) from input, a title: Generate's transliteration with underscores; one not starting with a letter gets prefix (and prefix alone stands for an empty one).
Types ¶
Click to show internal directories.
Click to hide internal directories.