Commit 7eeb4c5
Add support for empty input lists (#68)
* Add `FailOnEmpty` option to input
* Add fail on empty option to error condition
* Initialise empty results slice
With this change, if no groups are queried, an empty list is returned instead of null.
Signed-off-by: Tom van Dinther <[email protected]>
* Add empty cases for ref resolution tests
Also updates the mock to contain the same logic as added in the real implementation.
Signed-off-by: Tom van Dinther <[email protected]>
* Add test cases for `failOnEmpty` permutations
Signed-off-by: Tom van Dinther <[email protected]>
* Add FailOnEmpty option to function configuration options in README
Signed-off-by: Tom van Dinther <[email protected]>
---------
Signed-off-by: Tom van Dinther <[email protected]>
Co-authored-by: Yury Tsarev <[email protected]>1 parent 078b3f0 commit 7eeb4c5
4 files changed
+636
-34
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
275 | 275 | | |
276 | 276 | | |
277 | 277 | | |
278 | | - | |
| 278 | + | |
| 279 | + | |
279 | 280 | | |
280 | 281 | | |
281 | 282 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
497 | 497 | | |
498 | 498 | | |
499 | 499 | | |
500 | | - | |
| 500 | + | |
501 | 501 | | |
502 | 502 | | |
503 | 503 | | |
504 | | - | |
| 504 | + | |
505 | 505 | | |
506 | 506 | | |
507 | 507 | | |
| |||
754 | 754 | | |
755 | 755 | | |
756 | 756 | | |
757 | | - | |
| 757 | + | |
758 | 758 | | |
759 | 759 | | |
760 | 760 | | |
761 | | - | |
| 761 | + | |
762 | 762 | | |
763 | 763 | | |
764 | 764 | | |
| |||
799 | 799 | | |
800 | 800 | | |
801 | 801 | | |
802 | | - | |
| 802 | + | |
803 | 803 | | |
804 | 804 | | |
805 | 805 | | |
806 | | - | |
| 806 | + | |
807 | 807 | | |
808 | 808 | | |
809 | 809 | | |
| |||
1515 | 1515 | | |
1516 | 1516 | | |
1517 | 1517 | | |
1518 | | - | |
1519 | | - | |
1520 | | - | |
| 1518 | + | |
1521 | 1519 | | |
1522 | 1520 | | |
1523 | | - | |
| 1521 | + | |
1524 | 1522 | | |
0 commit comments