(code: string)
| 322 | } |
| 323 | |
| 324 | function wrapGeneratedGoComments(code: string): string { |
| 325 | return code |
| 326 | .split(/\r?\n/) |
| 327 | .flatMap((line) => { |
| 328 | const match = /^(\s*)\/\/\s?(.*)$/.exec(line); |
| 329 | if (!match) return [line]; |
| 330 | const [, indent, text] = match; |
| 331 | if (text.length <= goCommentTextWrapLength) return [line]; |
| 332 | return goCommentLines(text, indent); |
| 333 | }) |
| 334 | .join("\n"); |
| 335 | } |
| 336 | |
| 337 | interface GoExtractedField { |
| 338 | name: string; |
no test coverage detected
searching dependent graphs…