Skip to content

Ternary operator, String concat, Parameter flexibility

Compare
Choose a tag to compare
@Knetic Knetic released this 03 Jul 21:37
· 150 commits to master since this release

Features

  • Implemented ternary operator ( #12 and #17 )
  • Implemented string concatenation ( #13 )
  • Parameters can now be specified as structures other than map[string]interface{}. Anything that exposes a Get(string)(interface{}, error) method receiver can now be passed into Eval. ( #14 )

Enhancements

  • Optimized regex compilation. When a regex is used against a constant string, that string is compiled at parsing-time, not evaluation-time. Also allowed a *regexp.Regexp object to be passed in as a parameter, and used as the pattern for a regex. Strings used as patterns are still supported, but will be compiled during each evaluation, and therefore slower. ( #16 )