Documentation
¶
Overview ¶
Package pretty contains functions for prettifying and visualizing data in JSON and YAML formats. It includes support for masking sensitive fields when outputting data.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JSONMasked ¶
JSONMasked returns a prettified JSON representation of the provided object with masked sensitive fields.
func MaskJSON ¶
MaskJSON masks sensitive fields in the provided object according to predefined masking rules and returns the masked object. The masker replaces sensitive data with a mask character.
func PrintJSON ¶
func PrintJSON(obj any)
PrintJSON prints a prettified JSON representation of the provided object.
func PrintJSONMasked ¶
func PrintJSONMasked(obj any)
PrintJSONMasked prints a prettified JSON representation of the provided object with masked sensitive fields. It uses MaskJSON internally to mask the fields.
func PrintYAML ¶
func PrintYAML(obj any)
PrintYAML prints a prettified YAML representation of the provided object.
func PrintYAMLMasked ¶
func PrintYAMLMasked(obj any)
PrintYAMLMasked prints a prettified YAML representation of the provided object with masked sensitive fields. It uses MaskYAML internally to mask the fields.
func YAMLMasked ¶
YAMLMasked returns a prettified YAML representation of the provided object with masked sensitive fields. It uses JSONMasked internally to mask the fields.
Types ¶
This section is empty.