Discover Packages
github.com/retail-cortex/blitz
pkg
redact
package
Version:
v0.8.5
Opens a new window with list of versions in this module.
Published: Oct 26, 2026
License: Apache-2.0
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: 1 module, 0 packages
The first number is the count of modules that contain a package that imports this one.
The module count is a better indicator of popularity than the package count.
A module with 100 importing packages is counted only once instead of 100 times,
reflecting the fact that the choice to use the package was likely made only once,
not 100 times.
A '?' means that the value hasn't been computed yet.
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package redact masks secrets in text before it is written to disk.
Mask masks only the remembered values in s (not the patterns): for text
shown as it is, such as a model's answer.
PII masks the personal data in s and reports whether it found any.
func Remember(values ...string )
Remember adds values for every Redactor to mask from now on (ignoring
ones shorter than 8 characters, as New does).
Redactor masks known secret formats plus specific secret values.
FromEnv returns a redactor for the values of environment variables whose
names match any of the glob patterns (case-insensitive), e.g. "*_API_KEY".
New returns a redactor that also masks the given literal values (ignoring
ones shorter than 8 characters, which would cause false positives).
String masks secrets in s. A nil Redactor still applies the built-in
patterns and the remembered values.
Value masks secrets inside strings nested in maps and slices (e.g. tool
arguments), returning a copy.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.