Commit 22b0d1c
Fix validateCapabilities to handle nil and empty arrays for spec validation.
validateCapabilities was using reflect.DeepEqual which considers nil and empty
slices as different. But for validation of spec, these should be considered as
same. Fix this by calling validateArray (for each field within capabilities)
which compares the length of the array.
PiperOrigin-RevId: 8114361721 parent 092d474 commit 22b0d1c
2 files changed
+33
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3879 | 3879 | | |
3880 | 3880 | | |
3881 | 3881 | | |
3882 | | - | |
| 3882 | + | |
3883 | 3883 | | |
3884 | 3884 | | |
3885 | 3885 | | |
| |||
4111 | 4111 | | |
4112 | 4112 | | |
4113 | 4113 | | |
| 4114 | + | |
| 4115 | + | |
| 4116 | + | |
| 4117 | + | |
| 4118 | + | |
| 4119 | + | |
| 4120 | + | |
| 4121 | + | |
| 4122 | + | |
| 4123 | + | |
| 4124 | + | |
| 4125 | + | |
| 4126 | + | |
| 4127 | + | |
| 4128 | + | |
| 4129 | + | |
| 4130 | + | |
4114 | 4131 | | |
4115 | 4132 | | |
4116 | 4133 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | 213 | | |
222 | 214 | | |
223 | 215 | | |
224 | 216 | | |
225 | 217 | | |
226 | 218 | | |
227 | 219 | | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
232 | 235 | | |
233 | 236 | | |
234 | 237 | | |
| |||
0 commit comments