Skip to content

Releases: huttotw/grules

v1.4.0

14 Sep 17:31
230e84f
Compare
Choose a tag to compare

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

31 Jul 20:05
Compare
Choose a tag to compare
  • Adds regex comparator

v1.2.0

25 Mar 23:47
Compare
Choose a tag to compare

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

30 Jan 18:14
e6c3f57
Compare
Choose a tag to compare
  • 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

23 Mar 14:09
e5ba472
Compare
Choose a tag to compare

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

v0.2.1

01 Mar 15:55
Compare
Choose a tag to compare

Bug Fix:

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

v0.2.0

28 Feb 22:14
Compare
Choose a tag to compare

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

12 Feb 19:22
0d45f64
Compare
Choose a tag to compare

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

08 Jan 17:57
Compare
Choose a tag to compare

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

v0.1.1

14 Dec 19:51
87d8e53
Compare
Choose a tag to compare
  • added oneof comparator
  • significantly reduced allocations made in the contains function