Documentation
¶
Index ¶
Constants ¶
View Source
const Doc = `` /* 584-byte string literal not displayed */
Doc documents this pass.
Variables ¶
View Source
var Analyzer = &analysis.Analyzer{ Name: "errwrap", Doc: Doc, Requires: []*analysis.Analyzer{inspect.Analyzer}, Run: run, }
Analyzer checks for improperly wrapped errors.
View Source
var ErrorFnFormatStringIndex = map[string]int{
"errors.New": -1,
"github.com/pkg/errors.New": -1,
"github.com/pkg/errors.Wrap": -1,
"fmt.Errorf": 0,
"github.com/pkg/errors.Errorf": 0,
"github.com/pkg/errors.Wrapf": 1,
}
ErrorFnFormatStringIndex contains functions that should be checked for improperly wrapped errors. The value is the index of the function parameter containing the format string. It is -1 if there is no format string parameter.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.