redact

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package redact scrubs credential-shaped substrings from external command output before it is surfaced in an error, and caps the size so a misbehaving tool can't flood logs. It is deliberately conservative: it masks the well-known secret shapes (URL userinfo, GitHub/GitLab tokens, bearer and password fields) and leaves the rest of the diagnostic intact, so a failing `git pull` / `gh` / `glab` invocation still reports something actionable.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Output

func Output(b []byte) string

Output masks credential-shaped substrings in b and caps the result length. It trims surrounding whitespace, so callers need not TrimSpace first.

Types

This section is empty.

Jump to

Keyboard shortcuts

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