clifmt/internal/transform/transformer.go

15 lines
324 B
Go
Raw Normal View History

package transform
import (
"regexp"
)
type Transformer interface {
// Regex returns the regex matching text to replace
Regex() *regexp.Regexp
// Transform is called to replace a match by its transformation
// ; it takes as arguments the matched string chunks from the Regex()
Transform(...string) (string, error)
}