Documentation
¶
Overview ¶
Package diagnostics formats compiler errors and prints them in a consistent way.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Diagnostic ¶
A single diagnostic.
type PackageDiagnostic ¶
type PackageDiagnostic struct { ImportPath string // the same ImportPath as in `go list -json` Diagnostics []Diagnostic }
One or multiple errors of a particular package. It can also represent whole-program errors (like linker errors) that can't easily be connected to a single package.
type ProgramDiagnostic ¶
type ProgramDiagnostic []PackageDiagnostic
Diagnostics of a whole program. This can include errors belonging to multiple packages, or just a single package.
func CreateDiagnostics ¶
func CreateDiagnostics(err error) ProgramDiagnostic
CreateDiagnostics reads the underlying errors in the error object and creates a set of diagnostics that's sorted and can be readily printed.
Click to show internal directories.
Click to hide internal directories.