Documentation ¶
Overview ¶
Package analysis offers helpers for an easier and nicer reporting
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Report ¶
Report an Error with nice printing. The Node which is the Point-of-Failure must be passed.
Example: analysis.Report(pass,"your error message", pointOfFailure)
func ReportWithSuggestedFixes ¶
func ReportWithSuggestedFixes(pass *analysis.Pass, format string, corruptNode ast.Node, suggestedFixes []analysis.SuggestedFix)
ReportWithSuggestedFixes reports an Error with nice printing and suggested fixes. The Node which is the Point-of-Failure must be passed.
Example:
toolbox.ReportWithSuggestedFixes(pass,"your error message %s", pointOfFailure, []analysis.SuggestedFix{ { Message: "make code correct", TextEdits: []analysis.TextEdit{ { Pos: n.Pos(), End: n.End(), NewText: []byte("correct Code"), }, }, }, })
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.