(ops []*operation)
| 72 | } |
| 73 | |
| 74 | func sortOperations(ops []*operation) { |
| 75 | slices.SortFunc(ops, func(a, b *operation) int { |
| 76 | leftVerb, leftURL := parseOpName(a.Name) |
| 77 | rightVerb, rightURL := parseOpName(b.Name) |
| 78 | return cmp.Or(cmp.Compare(leftURL, rightURL), cmp.Compare(leftVerb, rightVerb)) |
| 79 | }) |
| 80 | } |
| 81 | |
| 82 | // normalizeOpPath returns an endpoint with all templated path parameters replaced with *. |
| 83 | func normalizeOpPath(opPath string) string { |
no test coverage detected
searching dependent graphs…