stringutil

package
v3.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package stringutil holds small string helpers shared across the internal packages. Depends on nothing but the standard library, so any of them can import it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Truncate

func Truncate(s string, limit int) string

Truncate shortens s to at most limit bytes, marking the cut with an ellipsis. The cut lands on a rune boundary, so the result stays valid UTF-8 — callers truncate HTTP response bodies for error messages, which are usually UTF-8.

Types

This section is empty.

Jump to

Keyboard shortcuts

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