mask

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: AGPL-3.0 Imports: 2 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

Overview

Package mask hides IP addresses in what the app shows while privacy mode is on, as for a screen share or a recording: "12.32.43.55" is "1*.**.**.*5". Only the first character of the address and the last one stay, so that the user can still tell two hosts apart at a glance; the shape (the dots, the colons, the number of digits) stays too.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IP

func IP(s string) string

IP masks s when it is an IP address, v4 or v6 (bracketed or not), and returns it as it is otherwise.

func Text

func Text(s string) string

Text masks every IP address in s: an address alone, user@address, address:port, [v6]:port, an address in an error message. An address glued to a word ("v1.2.3.4") is not one.

Types

This section is empty.

Jump to

Keyboard shortcuts

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