moderation

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package moderation rejects user-supplied display text (usernames, chat titles, flow names) that contains profanity, so the same rules apply everywhere a name is accepted. It wraps github.com/TwiN/go-away, which sanitises leetspeak and spacing tricks (f.u.c.k, fück) and carries a false-positive list (assassin, class, scunthorpe).

Index

Constants

This section is empty.

Variables

View Source
var ErrProfane = errors.New("name contains inappropriate language")

ErrProfane reports that the supplied text contains profanity.

Functions

func CheckName

func CheckName(name string) error

CheckName returns ErrProfane when name contains profanity and nil otherwise. Empty input is treated as clean; callers validate length separately.

Types

This section is empty.

Jump to

Keyboard shortcuts

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