handleGetDocumentationComment returns the rendered documentation comment of a symbol as plain text.
(ctx context.Context, params *CheckerSymbolParams)
| 2686 | |
| 2687 | // handleGetDocumentationComment returns the rendered documentation comment of a symbol as plain text. |
| 2688 | func (s *Session) handleGetDocumentationComment(ctx context.Context, params *CheckerSymbolParams) (string, error) { |
| 2689 | setup, err := s.setupChecker(ctx, params.Snapshot, params.Project) |
| 2690 | if err != nil { |
| 2691 | return "", err |
| 2692 | } |
| 2693 | defer setup.done() |
| 2694 | |
| 2695 | symbol, err := setup.resolveSymbolHandle(params.Symbol) |
| 2696 | if err != nil { |
| 2697 | return "", err |
| 2698 | } |
| 2699 | if symbol == nil { |
| 2700 | return "", nil |
| 2701 | } |
| 2702 | |
| 2703 | langSvc, err := s.setupLanguageService(setup.sd, setup.program, params.Project, "") |
| 2704 | if err != nil { |
| 2705 | return "", err |
| 2706 | } |
| 2707 | |
| 2708 | return langSvc.GetSymbolDocumentationComment(setup.checker, symbol), nil |
| 2709 | } |
| 2710 | |
| 2711 | // handleGetTypeArguments returns the type arguments of a type reference. |
| 2712 | func (s *Session) handleGetTypeArguments(ctx context.Context, params *CheckerTypeParams) ([]*TypeResponse, error) { |
no test coverage detected