Documentation
¶
Index ¶
- func CensorTextWithRegex(text string, forbiddenPhrases ...CensorRegexRedactor) string
- func Debug(msg string, args ...any)
- func Error(msg string, args ...any)
- func Info(msg string, args ...any)
- func NewCustomHandler(writer io.Writer, opts *slog.HandlerOptions) slog.Handler
- func NewCustomLogger(w io.Writer) *slog.Logger
- func Warn(msg string, args ...any)
- type CensorRegexRedactor
- type CustomHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CensorTextWithRegex ¶ added in v0.1.4
func CensorTextWithRegex(text string, forbiddenPhrases ...CensorRegexRedactor) string
CensorTextWithRegex Returns text with censored phrases. Additional phrases that should be hidden in text might be added as param 'forbiddenPhrases'. If param 'forbiddenPhrases' is not set then only default forbidden phrases are taken into account
func NewCustomHandler ¶
NewCustomHandler creates a new instance of CustomHandler
Types ¶
type CensorRegexRedactor ¶ added in v0.1.4
type CustomHandler ¶
type CustomHandler struct {
// contains filtered or unexported fields
}
CustomHandler implements the slog.Handler interface
Click to show internal directories.
Click to hide internal directories.