Help us shape the future of Go! Take the 2026 Go Developer Survey

textsafe

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package textsafe makes untrusted text (PR titles, bodies, agent output) safe to print to a terminal.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clean

func Clean(s string) string

Clean normalizes CRLF to LF, expands tabs, and drops every other control character — including ESC, so the text cannot inject terminal escape sequences, and CR, which would redraw from the line start.

func Line

func Line(s string) string

Line is Clean for single-line fields: newlines become spaces.

Types

This section is empty.

Jump to

Keyboard shortcuts

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