nameable

package
v5.28.2 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: MPL-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Apply

func Apply(str string, m map[string]string) string

Apply replaces the matching nameable sections with the values from the set.

func ApplyToList

func ApplyToList(in []string, m map[string]string) []string

ApplyToList replaces the matching nameable sections with the values from the set.

func Extract

func Extract(str string, m, existing map[string]string)

Extract the nameable sections of the string into the set.

func Reduce

func Reduce(needed, replacements map[string]string) map[string]string

Reduce returns a map of the replacements which exist in needed.

Types

type Accesser

type Accesser interface {
	// NameableReplacements returns the replacements to be used with Nameables.
	NameableReplacements() map[string]string
}

Accesser defines the method for retrieving the nameable replacements.

type Applier

type Applier interface {
	Accesser
	Filler
	// ApplyNameableKeys applies the nameable keys to this object.
	ApplyNameableKeys(m map[string]string)
}

Applier defines methods types that want to participate the nameable adjustments should implement.

type Filler

type Filler interface {
	// FillWithNameableKeys fills the map with nameable keys.
	FillWithNameableKeys(m, existing map[string]string)
}

Filler defines the method for filling the nameable key map.

Jump to

Keyboard shortcuts

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