Documentation
¶
Overview ¶
Package redact scrubs known secret values from strings before logging.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Target ¶ added in v0.7.16
Target returns a sanitized, human-readable identifier for a publish destination, suitable for storage and display. Webhook URLs collapse to their host. github-issue URLs collapse to "<owner>/<repo>". Channel-style or email targets pass through. Inputs that can't be classified pass through unchanged.
Types ¶
type Redactor ¶
type Redactor struct {
// contains filtered or unexported fields
}
Redactor replaces known secret values with a fixed placeholder.
Callers must funnel any string through Redact before it reaches a log sink; the redactor cannot intercept logs it never sees. Typical wiring is to construct one Redactor per run from secrets.Resolver.AllValues() and use it as the single log-formatting choke point.