mask

package
v1.1.0-beta.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DataMasking

func DataMasking(str string, private []string) string

DataMasking 将 str 中出现的每一个 private 敏感串替换为占位符。 private 里的值是调用方已知的精确字符串(如 OAuth client secret/id), 因此这里做精确子串匹配即可,不需要模糊匹配。 连续被遮蔽的片段长度超过 5 时保留首尾字符方便定位,否则整段替换。

Types

This section is empty.

Jump to

Keyboard shortcuts

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