(in interface{})
| 618 | } |
| 619 | |
| 620 | func InterfaceToStrInterfaceMapSlice(in interface{}) ([]map[string]interface{}, bool) { |
| 621 | if in == nil { |
| 622 | return nil, true |
| 623 | } |
| 624 | |
| 625 | if strMapSlice, ok := in.([]map[string]interface{}); ok { |
| 626 | return strMapSlice, true |
| 627 | } |
| 628 | |
| 629 | inSlice, ok := InterfaceToInterfaceSlice(in) |
| 630 | if !ok { |
| 631 | return nil, false |
| 632 | } |
| 633 | |
| 634 | out := make([]map[string]interface{}, len(inSlice)) |
| 635 | |
| 636 | for i, elem := range inSlice { |
| 637 | casted, ok := InterfaceToStrInterfaceMap(elem) |
| 638 | if !ok { |
| 639 | return nil, false |
| 640 | } |
| 641 | out[i] = casted |
| 642 | } |
| 643 | return out, true |
| 644 | } |
| 645 | |
| 646 | func InterfaceToInterfaceInterfaceMap(in interface{}) (map[interface{}]interface{}, bool) { |
| 647 | if in == nil { |
no test coverage detected