slug

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package slug provides URL-friendly slug generation from names.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(name string) string

Generate creates a slug from the given name with a random 4-character suffix. If name is empty, returns just the random suffix.

func Slugify

func Slugify(name string) string

Slugify converts a name into a URL-friendly slug. It lowercases the input, replaces non-alphanumeric characters with hyphens, and trims leading/trailing hyphens.

Types

This section is empty.

Jump to

Keyboard shortcuts

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