Grules Versions Save

A simple, but expandable, rules engine for Go

v1.4.0

3 years ago

contains and ncontains now support strings instead of just slices. This is magnitudes faster than using the regex comparator for the same functionality.

v1.3.0

4 years ago
  • Adds regex comparator

v1.2.0

5 years ago

In this release we remove support for creating a new Engine without JSON. We force users to use JSON because there is special function of our unmarshal that provides a massive speedup when using noneof or oneof.

v1.0.0

5 years ago
  • Improved speed by reducing allocations made on the heap in Contains, NotContains, OneOf, NotOneOf
  • We are now consistent in returning false from any comparator which is trying to compare two values of different types. For instance, checking if a []string contains a float64 will return false; this used to return true.

v0.2.2

6 years ago

With this release, we introduce a new comparator ncontains, which will return true if a is not contained in b.

v0.2.1

6 years ago

Bug Fix:

  • Fixed some copy pasta that led to gt actually being gte

v0.2.0

6 years ago

In this release we drop support for all types other than string and float64. This was done in order to play more nicely with encoding/json.

For more information: https://golang.org/pkg/encoding/json/#Token

Bug Fixes

  • comparing int64 to float64 when the rule contained an integer, this always returned false.

v0.1.3

6 years ago

This release contains a bug fix that impacted that gte and gt comparators. In short, the gte and gt functions returned true if the types did not match.

v0.1.2

6 years ago

This provides enhancement in the contains function; type asserting to slices of interfaces instead of the perceived type.

v0.1.1

6 years ago
  • added oneof comparator
  • significantly reduced allocations made in the contains function