Versions in this module Expand all Collapse all v0 v0.3.7 May 14, 2022 Changes in this version + var ErrIncomplete = errors.New("catmsg: incomplete message; may not give result for all inputs") + var ErrNoMatch = errors.New("catmsg: no translation for inputs") + func Compile(tag language.Tag, macros Dictionary, m Message) (data string, err error) + type Affix struct + Message Message + Prefix string + Suffix string + func (a Affix) Compile(e *Encoder) (err error) + type Decoder struct + func NewDecoder(tag language.Tag, r Renderer, macros Dictionary) *Decoder + func (d *Decoder) Arg(i int) interface{} + func (d *Decoder) DecodeString() string + func (d *Decoder) DecodeUint() uint64 + func (d *Decoder) Done() bool + func (d *Decoder) Execute(msg string) error + func (d *Decoder) ExecuteMessage() bool + func (d *Decoder) ExecuteSubstitution() + func (d *Decoder) Language() language.Tag + func (d *Decoder) Render(s string) + func (d *Decoder) SkipMessage() + type Dictionary interface + Lookup func(key string) (data string, ok bool) + type Encoder struct + func (e *Encoder) EncodeMessage(m Message) error + func (e *Encoder) EncodeMessageType(h Handle) + func (e *Encoder) EncodeString(s string) + func (e *Encoder) EncodeSubstitution(name string, arguments ...int) + func (e *Encoder) EncodeUint(x uint64) + func (e *Encoder) Language() language.Tag + type FirstOf []Message + func (s FirstOf) Compile(e *Encoder) error + type Handle int + func Register(name string, handler Handler) Handle + type Handler func(d *Decoder) bool + type Message interface + Compile func(e *Encoder) error + type Raw string + func (r Raw) Compile(e *Encoder) (err error) + type Renderer interface + Arg func(i int) interface{} + Render func(s string) + type String string + func (s String) Compile(e *Encoder) (err error) + type Var struct + Message Message + Name string + func (v *Var) Compile(e *Encoder) error