Help us shape the future of Go! Take the 2026 Go Developer Survey

redact

package
v0.32.5 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package redact provides byte-oriented secret redaction for log files and other persisted artifacts. It is a thin façade over pkg/secretdetect that emits [REDACTED:<rule-id>] tokens so operators can tell what *kind* of secret was present in a log line without exposing its value.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Apply

func Apply(data []byte) []byte

Apply returns a copy of data with detected secrets replaced by [REDACTED:<rule-id>] tokens. The original slice is not modified.

func String

func String(s string) string

String is a convenience wrapper around Apply for string input.

Types

This section is empty.

Jump to

Keyboard shortcuts

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