redact

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package redact includes helpers to redact or transform sensitive content in files, used by fix/remediation commands in the CLI.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Apply

func Apply(path string, reps []Replacement) (bool, error)

Apply applies replacements to a file on disk. Returns true if changed.

func WouldChange

func WouldChange(path string, reps []Replacement) (bool, error)

WouldChange returns true if applying replacements would modify the file, without writing.

Types

type Replacement

type Replacement struct {
	Pattern *regexp.Regexp
	Replace string
}

Jump to

Keyboard shortcuts

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