utils

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package utils provides utility functions for docmgr.

The Slugify function converts arbitrary strings into filesystem-friendly slugs suitable for use in filenames and directory names.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Slugify

func Slugify(input string) string

Slugify converts an arbitrary string into a filesystem-friendly slug: - lowercases - replaces any non [a-z0-9] with '-' - collapses consecutive '-' - trims leading/trailing '-'

func SlugifyTitleForTicket added in v0.0.7

func SlugifyTitleForTicket(ticket, title string) string

SlugifyTitleForTicket generates a slug from a title while avoiding duplicating the ticket identifier. If the title begins with the ticket identifier (a common pattern like "MEN-1234: Title"), the ticket prefix and any separators are removed before slugifying. When the stripped title becomes empty, the ticket identifier itself is slugified as a fallback.

Types

This section is empty.

Jump to

Keyboard shortcuts

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