Closed manisharma closed 1 year ago
Thanks for the contribution. Would you mind adding a unit test to prevent future regressions please?
Done.
@microsoft-github-policy-service agree
@manisharma your last changes are failing to test, would you mind taking another look before I review the changes please?
pre-existing tests are failing @baywet
@manisharma it isn't on main if some additional unit tests are failing because of the change you've made, please update them.
Yes thanks. I deleted pre-existing setup unknowingly. @baywet
Overview
Generic
func convertToPage[T interface{}](response interface{}) (PageResult[T], error)
method usesIsNil()
method fromreflect
package eg:method.IsNil()
to check if theresponse
argument isNil
and as a result itpanics
and theactual
/intended
error is never returned. The PR addresses the panic, by replacingmethod.IsNil()
check withmethod.Kind() == reflect.Invalid