msgproc

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MessageProcessor

type MessageProcessor interface {
	// The Process receives the message text and returns it after processing.
	Process(msg string) string
}

MessageProcessor is a tool to process messages before sending.

func NewProcessingChain added in v0.4.0

func NewProcessingChain(processors ...MessageProcessor) MessageProcessor

NewProcessingChain returns chain of the MessageProcessor instances.

func NewReplacer added in v0.4.0

func NewReplacer(replaces types.KeyVal) MessageProcessor

NewReplacer returns a MessageProcessor replacing substrings in the message.

func NewTextNormalizer added in v0.4.0

func NewTextNormalizer() MessageProcessor

NewTextNormalizer returns a MessageProcessor normalizing the text.

Jump to

Keyboard shortcuts

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