text

package
v0.0.0-...-faec9f9 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	START = iota
	DOLLAR
	BRACKET
	DOLLARBRACKET
	ANTISLASH
	ANTISLASHBRACKET
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Lookuper

type Lookuper interface {
	Lookup(string) (string, bool, error)
}

type MapLookup

type MapLookup struct {
	Map map[string]string
}

func NewMapLookup

func NewMapLookup(m map[string]string) *MapLookup

func (MapLookup) Lookup

func (l MapLookup) Lookup(s string) (string, bool, error)

type StringSubstitutor

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

func NewStringSubstitutorByLookuper

func NewStringSubstitutorByLookuper(lookup Lookuper) *StringSubstitutor

func NewStringSubstitutorByMap

func NewStringSubstitutorByMap(themap map[string]string) *StringSubstitutor

func (*StringSubstitutor) Replace

func (subst *StringSubstitutor) Replace(s string) (string, error)

Jump to

Keyboard shortcuts

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