handlers

package
v0.0.0-...-2155e2d Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2020 License: BSD-3-Clause Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GoMessageHandler

type GoMessageHandler struct {
	Translator nptl.Translator
	NewLang    language.Tag
}

func (*GoMessageHandler) Handle

func (h *GoMessageHandler) Handle(ctx context.Context, source []byte) ([]byte, error)

type KeyValueHandler

type KeyValueHandler struct {
	Translator                 nptl.Translator
	TranslateLeadingWhitespace bool
}

func (*KeyValueHandler) Handle

func (h *KeyValueHandler) Handle(ctx context.Context, source []byte) ([]byte, error)

type LineHandler

type LineHandler struct {
	Translator          nptl.Translator
	TranslateBlankLines bool
}

func (*LineHandler) Handle

func (h *LineHandler) Handle(ctx context.Context, source []byte) ([]byte, error)

type SubstitutionCache

type SubstitutionCache struct {
	// contains filtered or unexported fields
}

func (*SubstitutionCache) ReplaceAll

func (c *SubstitutionCache) ReplaceAll(rs nptl.Runes) (nptl.Runes, error)

func (*SubstitutionCache) Substitute

func (c *SubstitutionCache) Substitute(rs, search, replace nptl.Runes) (nptl.Runes, error)

func (*SubstitutionCache) SubstituteStrings

func (c *SubstitutionCache) SubstituteStrings(rs nptl.Runes, search, replace string) (nptl.Runes, error)

type TextHandler

type TextHandler struct {
	Translator nptl.Translator
}

func (*TextHandler) Handle

func (h *TextHandler) Handle(ctx context.Context, source []byte) ([]byte, error)

Jump to

Keyboard shortcuts

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