redact

package
v1.28.0 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2026 License: MIT Imports: 5 Imported by: 0 modules, 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.

Documentation

Index

Constants

View Source
const RedactedValue = "[REDACTED]"

Variables

This section is empty.

Functions

func Args

func Args(action, subcommand string, args []string) []string

Args applies command-specific redaction to positional arguments.

func ErrorMessage

func ErrorMessage(msg string) string

ErrorMessage scrubs known secret patterns from error strings before telemetry export.

func Flag

func Flag(name, value string) string

Flag redacts a single CLI flag value based on flag name.

func SafeJWTClaimsForLog

func SafeJWTClaimsForLog(claims map[string]interface{}) map[string]interface{}

SafeJWTClaimsForLog returns an allowlisted subset of JWT claims safe for debug logging.

func URL

func URL(rawURL string) string

URL returns a version of rawURL with credentials masked to avoid leaking secrets that may be embedded in RPC or asset URLs. For example, "https://rpc.example.com/v1/my-secret-key" becomes "https://rpc.example.com/v1/***".

Types

This section is empty.

Jump to

Keyboard shortcuts

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