Help us shape the future of Go! Take the 2026 Go Developer Survey

mask

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package mask shortens personal identifiers for log lines. A log is not the place for an address: a user id finds the account when support needs it, and a leaked log then names nobody.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Email

func Email(s string) string

Email keeps the first character and the domain: "a***@example.com". Anything that is not an address is masked whole.

func Emails

func Emails(addrs []string) []string

Emails masks each address.

func Identifier

func Identifier(s string) string

Identifier masks whatever a sign-in identifier is: an address as an address, a phone number as a phone number, anything else whole.

func Phone

func Phone(s string) string

Phone keeps the last four digits: "***1234".

Types

This section is empty.

Jump to

Keyboard shortcuts

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