textsafe

package
v0.2.6 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Span

type Span struct {
	Start int
	End   int
}

Span 表示输入中“允许参与脱敏匹配”的连续字节区间。 控制字符、ANSI 转义序列、零宽/格式字符都会被当作边界跳过。

func RedactableSpans

func RedactableSpans(input []byte) []Span

RedactableSpans 将输入拆成若干安全文本段。 这样可以避免规则跨越终端控制符或 ANSI 样式序列,把格式字节一并替换掉。

Jump to

Keyboard shortcuts

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