Fix selector behaviour (#26)
Badges / coveralls (push) Successful in 1m4s

Co-authored-by: Natercio Moniz <[email protected]>
Co-committed-by: Natercio Moniz <[email protected]>
This commit was merged in pull request #26.
This commit is contained in:
natercio authored and Natercio Moniz committed 2026-07-11 15:24:54 +01:00
1 parent 8b2c4aa6fe
commit 1ce8561782
6 files changed
+66 -65

No files matched your search

+3
View File
@@ -16,12 +16,15 @@ func And(a, b Selector) Selector {
}
}
// OnlyNature will only select records with the given Nature n (G01, G20, etc...).
func OnlyNature(n Nature) Selector {
return func(r Record) bool {
return r.Nature() == n
}
}
// OnlyAssetCountry will only select records with the given ISO code c (620 for Portugal, 196 for
// Cyprus, etc...).
func OnlyAssetCountry(c int64) Selector {
return func(r Record) bool {
return r.AssetCountry() == c