examples/

directory
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2026 License: MIT

Directories

Path Synopsis
Basic demonstrates: NewMessageCatalog, GetMessageWithCtx (nil params and with Params), GetErrorWithCtx, WrapErrorWithCtx, and the msgcat.Error interface.
Basic demonstrates: NewMessageCatalog, GetMessageWithCtx (nil params and with Params), GetErrorWithCtx, WrapErrorWithCtx, and the msgcat.Error interface.
Cldr_plural demonstrates CLDR plural forms (short_forms/long_forms) in the message catalog.
Cldr_plural demonstrates CLDR plural forms (short_forms/long_forms) in the message catalog.
Load_messages demonstrates runtime loading via LoadMessages: keys must have the sys.
Load_messages demonstrates runtime loading via LoadMessages: keys must have the sys.
Msgdef demonstrates defining messages in Go with msgcat.MessageDef.
Msgdef demonstrates defining messages in Go with msgcat.MessageDef.
Reload demonstrates: Reload(catalog) re-reads YAML from disk.
Reload demonstrates: Reload(catalog) re-reads YAML from disk.
Stats demonstrates SnapshotStats, ResetStats, and stat keys (LanguageFallbacks, MissingLanguages, MissingMessages, TemplateIssues, DroppedEvents, LastReloadAt).
Stats demonstrates SnapshotStats, ResetStats, and stat keys (LanguageFallbacks, MissingLanguages, MissingMessages, TemplateIssues, DroppedEvents, LastReloadAt).
Strict demonstrates StrictTemplates: when a template parameter is missing, the placeholder is replaced with <missing:paramName> and observer/stats record the issue.
Strict demonstrates StrictTemplates: when a template parameter is missing, the placeholder is replaced with <missing:paramName> and observer/stats record the issue.

Jump to

Keyboard shortcuts

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