replacer

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// EmptyValue is the default empty value.
	EmptyValue = "-"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Replacer

type Replacer struct{}

Replacer replaces labels for values in strings.

func New

func New() Replacer

New makes a new replacer. This only needs to be called once in the setup and then call Replace for each incoming message. A replacer is safe for concurrent use.

func (Replacer) Replace

func (r Replacer) Replace(ctx context.Context, state request.Request, rr *dnstest.Recorder, s string) string

Replace performs a replacement of values on s and returns the string with the replaced values.

Jump to

Keyboard shortcuts

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