Documentation
¶
Overview ¶
Package redact scrubs secrets from text destined for logs and errors.
A Redactor replaces secrets registered at run time (the values the host sends in initialize) and anything that looks like a well-known key format.
Index ¶
Constants ¶
View Source
const MinSecretLen = 8
MinSecretLen is the shortest secret, in runes, that Add accepts.
View Source
const Replacement = "‹redacted›"
Replacement is written in place of every secret.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Redactor ¶
type Redactor struct {
// contains filtered or unexported fields
}
Redactor replaces registered secrets and well-known key formats. It is safe for concurrent use. A nil *Redactor is valid and applies only the patterns.
Click to show internal directories.
Click to hide internal directories.