(value reflect.Value, name string)
| 129 | } |
| 130 | |
| 131 | func getExplicitMethod(value reflect.Value, name string) reflect.Value { |
| 132 | if isExplicitMethod(value.Type(), name) { |
| 133 | return value.MethodByName(name) |
| 134 | } |
| 135 | if value.CanAddr() && isExplicitMethod(value.Addr().Type(), name) { |
| 136 | return value.Addr().MethodByName(name) |
| 137 | } |
| 138 | return reflect.Value{} |
| 139 | } |
| 140 | |
| 141 | func isExplicitMethod(t reflect.Type, name string) bool { |
| 142 | method, ok := t.MethodByName(name) |
no test coverage detected