Commit 7b5e2ee
Anivar A Aravind
Implement review feedback: omit empty fields and proper error wrapping
- Use %w for proper error wrapping as suggested by @anderseknert
- Omit empty optional fields as suggested by @srenatus
- Update tests to match new behavior
- This makes the API more idiomatic to Rego where checking for field
existence is clearer than checking for empty strings
Signed-off-by: Anivar A Aravind <[email protected]>1 parent 7c0cf8b commit 7b5e2ee
2 files changed
+34
-31
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
| 37 | + | |
44 | 38 | | |
45 | 39 | | |
46 | 40 | | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | 41 | | |
52 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
53 | 63 | | |
54 | 64 | | |
55 | 65 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
93 | 90 | | |
94 | 91 | | |
95 | 92 | | |
96 | 93 | | |
97 | 94 | | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
104 | 99 | | |
105 | 100 | | |
106 | 101 | | |
| |||
114 | 109 | | |
115 | 110 | | |
116 | 111 | | |
117 | | - | |
118 | 112 | | |
119 | 113 | | |
120 | 114 | | |
121 | 115 | | |
122 | 116 | | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
129 | 122 | | |
130 | 123 | | |
131 | 124 | | |
| |||
0 commit comments