diagnosticCodeString formats the diagnostic code for display.
(d *lsproto.Diagnostic)
| 39 | |
| 40 | // diagnosticCodeString formats the diagnostic code for display. |
| 41 | func diagnosticCodeString(d *lsproto.Diagnostic) string { |
| 42 | if d.Code == nil { |
| 43 | return "?" |
| 44 | } |
| 45 | if d.Code.Integer != nil { |
| 46 | return strconv.Itoa(int(*d.Code.Integer)) |
| 47 | } |
| 48 | if d.Code.String != nil { |
| 49 | return *d.Code.String |
| 50 | } |
| 51 | return "?" |
| 52 | } |
| 53 | |
| 54 | func diagnosticMessageString(d *lsproto.Diagnostic) string { |
| 55 | if d.Message.String != nil { |
no outgoing calls
no test coverage detected