transformer

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Replacer

type Replacer struct {
	From string
	To   string
}

Replacer is struct used to feed strings.Replacer

func (Replacer) Unmarshal

func (r Replacer) Unmarshal() (result []string)

Unmarshal read a struct of Replacer then return a slice of string

type Replacers

type Replacers []Replacer

Replacers is an array of Replacer

func (Replacers) Unmarshal

func (replacers Replacers) Unmarshal() (result []string)

Unmarshal read a struct of Replacers then return a slice of string

type Transformer

type Transformer map[string]interface{}

Transformer holds a tranformer rule

func (*Transformer) Apply

func (t *Transformer) Apply(input string) (output string, err error)

Apply applies a single transformation based on a key

type Transformers

type Transformers []Transformer

Transformers holds a list of transformer

func (*Transformers) Apply

func (t *Transformers) Apply(input string) (output string, err error)

Apply applies a list of transformers

Jump to

Keyboard shortcuts

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