Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { Configs []yaml.Node `yaml:"configs"` Transforms []string }
Config represents the loaded transformer configuration.
func LoadConfigFile ¶
LoadConfigFile loads the transform configuration from the specified YAML file.
func ParseConfig ¶
ParseConfig parses the supplied YAML data to create an instance of Config.
func (Config) ConfigureAll ¶
ConfigureAll configures all of the transformers currently registered.
type Replacement ¶
type Replacement struct {
// contains filtered or unexported fields
}
Replacement represents a replacement string of the form /<match-re>/<replacement>/
func NewReplacement ¶
func NewReplacement(s string) (Replacement, error)
NewReplacement accepts a string of the form /<match-re>/<replacement>/ to create a Replacement that will apply <match-re.ReplaceAllString(<replace>).
func (Replacement) MatchString ¶
func (sr Replacement) MatchString(input string) bool
Match applies regexp.MatchString.
func (Replacement) ReplaceAllString ¶
func (sr Replacement) ReplaceAllString(input string) string
ReplaceAllString(input string) applies regexp.ReplaceAllString.
Click to show internal directories.
Click to hide internal directories.