Releases: huttotw/grules
Releases · huttotw/grules
v1.4.0
contains
and ncontains
now support strings instead of just slices. This is magnitudes faster than using the regex
comparator for the same functionality.
v1.2.0
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
- 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
With this release, we introduce a new comparator ncontains, which will return true if a is not contained in b.
v0.2.1
Bug Fix:
- Fixed some copy pasta that led to gt actually being gte
v0.2.0
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
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
This provides enhancement in the contains function; type asserting to slices of interfaces instead of the perceived type.
v0.1.1
- added
oneof
comparator
- significantly reduced allocations made in the contains function