findResolvers searches a given type for resolvers matching a specified resolverType. It returns a findResult indicating whether such resolvers were found.
(resolverType, t reflect.Type)
| 268 | // findResolvers searches a given type for resolvers matching a specified resolverType. |
| 269 | // It returns a findResult indicating whether such resolvers were found. |
| 270 | func findResolvers(resolverType, t reflect.Type) *findResult[bool] { |
| 271 | return findInType(t, func(t reflect.Type, path []int) bool { |
| 272 | tp := reflect.PointerTo(t) |
| 273 | if tp.Implements(resolverType) || tp.Implements(resolverWithPathType) { |
| 274 | return true |
| 275 | } |
| 276 | return false |
| 277 | }, nil, true) |
| 278 | } |
| 279 | |
| 280 | // findDefaults identifies struct fields with "default" tags and attempts to resolve |
| 281 | // their values using the provided registry. |
no test coverage detected
searching dependent graphs…