package
0.0.0-20201102054017-282493799a89
Repository: https://github.com/golangltd/leafltd.git
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.
First is used as a Handle to EncodeMessageType, followed by a series of calls to EncodeMessage, to implement selecting the first matching Message.

# Structs

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

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.