Panic recovered FiltersFromFlatMap
This commit is contained in:
@@ -161,6 +161,11 @@ type Filter struct {
|
||||
// Keys inside "and"/"or" are json tag names; the function resolves each to its
|
||||
// full dotted BSON path using the target struct. Unknown keys are kept as-is.
|
||||
func FiltersFromFlatMap(flatMap map[string]interface{}, target interface{}) *Filters {
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
fmt.Printf("Panic recovered FiltersFromFlatMap: %v\n", r)
|
||||
}
|
||||
}()
|
||||
filters := &Filters{
|
||||
And: make(map[string][]Filter),
|
||||
Or: make(map[string][]Filter),
|
||||
|
||||
Reference in New Issue
Block a user