package
0.21.0
Repository: https://go.googlesource.com/text
Documentation: pkg.go.dev

# Functions

Compile converts a Message to a data string that can be stored in a Catalog.
NewDecoder returns a new Decoder.
Register records the existence of a message type and returns a Handle that can be used in the Encoder's EncodeMessageType method to create such messages.

# Variables

ErrIncomplete indicates a compiled message does not define translations for all possible argument values.
ErrNoMatch indicates no translation message matched the given input parameters when evaluating a message.

# Structs

Affix is a message that adds a prefix and suffix to another message.
A Decoder deserializes and evaluates messages that are encoded by an encoder.
An Encoder serializes a Message to a string.
Var defines a message that can be substituted for a placeholder of the same name.

# Interfaces

A Dictionary specifies a source of messages, including variables or macros.
A Message holds a collection of translations for the same phrase that may vary based on the values of substitution arguments.
A Renderer renders a Message.

# Type aliases

FirstOf is a message type that prints the first message in the sequence that resolves to a match for the given substitution arguments.
A Handle refers to a registered message type.
A Handler decodes and evaluates data compiled by a Message and sends the result to the Decoder.
Raw is a message consisting of a single format string that is passed as is to the Renderer.
String is a message consisting of a single format string which contains placeholders that may be substituted with variables.