Tail ident of a handler arg: `gin.Logger()`→`Logger`, `mw`→`mw`; null for string paths / closures.
(expr: string)
| 1515 | } |
| 1516 | /** Tail ident of a handler arg: `gin.Logger()`→`Logger`, `mw`→`mw`; null for string paths / closures. */ |
| 1517 | function goHandlerIdent(expr: string): string | null { |
| 1518 | const cleaned = expr.trim().replace(/\(\s*\)$/, ''); // drop a trailing call () |
| 1519 | if (!cleaned || cleaned.startsWith('"') || cleaned.startsWith('`') || cleaned.startsWith('func')) return null; |
| 1520 | const m = cleaned.match(/(?:\.|^)([A-Za-z_]\w*)$/); |
| 1521 | return m ? m[1]! : null; |
| 1522 | } |
| 1523 | |
| 1524 | function ginMiddlewareChainEdges(queries: QueryBuilder, ctx: ResolutionContext): Edge[] { |
| 1525 | // 1. Find the chain dispatcher(s): a Go method that invokes a `handlers` slice by index. |
no outgoing calls
no test coverage detected