Documentation
¶
Overview ¶
Package redact masks key-like tokens in any text that may flow into a JSON envelope or error message. It is the single canonical sanitizer.
The goal is NOT bulletproof secret scrubbing — it is defense-in-depth on surfaces that should never contain a key. Callers should still avoid building error strings out of raw response bodies; this is the last line of defense.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MaskKeyLike ¶
MaskKeyLike replaces every key-like substring in b with a canonical placeholder. b is consumed read-only; a fresh slice is returned. nil/empty input returns the input unchanged.
func MaskKeyLikeString ¶
MaskKeyLikeString is the string analogue of MaskKeyLike — convenience for callers that already hold a string (e.g. error messages).
Types ¶
This section is empty.