package
Version:
v0.2.6
Opens a new window with list of versions in this module.
Published: Mar 26, 2026
License: Apache-2.0
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type Span struct {
Start int
End int
}
Span 表示输入中“允许参与脱敏匹配”的连续字节区间。
控制字符、ANSI 转义序列、零宽/格式字符都会被当作边界跳过。
func RedactableSpans(input []byte) []Span
RedactableSpans 将输入拆成若干安全文本段。
这样可以避免规则跨越终端控制符或 ANSI 样式序列,把格式字节一并替换掉。
Source Files
¶
Click to show internal directories.
Click to hide internal directories.