slug

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package slug turns text, such as the name of a mock, into a part of a file name that every system accepts.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Make

func Make(s string, limit int) string

Make returns s as letters, digits, '.', '_' and '-': each run of anything else becomes one '-'. It is at most limit bytes long, never starts or ends with '-' or '.', and is "" when s holds nothing else.

Types

This section is empty.

Jump to

Keyboard shortcuts

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