(q query)
| 1424 | } |
| 1425 | |
| 1426 | func getNodeDepth(q query) int { |
| 1427 | type Depth interface { |
| 1428 | depth() int |
| 1429 | } |
| 1430 | if count, ok := q.(Depth); ok { |
| 1431 | return count.depth() |
| 1432 | } |
| 1433 | return 0 |
| 1434 | } |
| 1435 | |
| 1436 | func getXPathType(i interface{}) resultType { |
| 1437 | v := reflect.ValueOf(i) |