Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractVars ¶
ExtractVars from the string expression Return data: [["{{key1}}", "key1"], ["{{key2}}", "key2"]]
Types ¶
type ExecContext ¶
func (ExecContext) Get ¶
func (c ExecContext) Get(key string) any
type Matcher ¶
type Matcher interface {
Match(s string, ectx ExecContext) (offset int)
}
func NewConstMatcher ¶
NewConstMatcher defines constant part of the pattern
func NewVarMatcher ¶
NewVarMatcher for the specific variable in the pattern
type Pattern ¶
type Pattern struct {
// contains filtered or unexported fields
}
Pattern matcher type
func NewPatternFromExpression ¶
NewPatternFromExpression parse expression {{varname}} - variable definition in the pattern Example:
posts_{{id}}
func (*Pattern) Format ¶
func (p *Pattern) Format(vals ValueGetter) string
type ValueGetter ¶
Click to show internal directories.
Click to hide internal directories.