masker

package
v1.32.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultFieldNames     = []string{"Password", "KeyData"}
	DefaultYAMLFieldNames = []string{"password", "keyData"}
)

Functions

func MaskStruct

func MaskStruct(strct any, fieldNamesToMask []string) any

MaskStruct replace password values with mask and returns copy of the strct. Original strct value is not modified. Doesn't go recursively through strct properties.

func MaskYaml

func MaskYaml(yamlStr string, fieldNamesToMask []string) (string, error)

MaskYaml replace password values with mask and returns copy of the string. Does recursive replacement for entire yamlStr.

Types

This section is empty.

Jump to

Keyboard shortcuts

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