README
¶
wraperr
Check that error return value are wrapped
Install
go get -u github.com/srvc/wraperr/cmd/wraperr
Usage
To check all packages beneath the current directory:
wraperr ./...
Inspired
Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Analyzer = &analysis.Analyzer{ Name: "wraperr", Doc: "Check that error return value are wrapped", Requires: []*analysis.Analyzer{inspect.Analyzer}, Run: runAnalyze, }
View Source
var ( // WrapperFuncList contains "path/to/pkg.Funcname" strings that adds a context to errors. WrapperFuncList = []string{ "errors.New", "fmt.Errorf", "github.com/pkg/errors.Errorf", "github.com/pkg/errors.New", "github.com/pkg/errors.WithMessage", "github.com/pkg/errors.WithStack", "github.com/pkg/errors.Wrap", "github.com/pkg/errors.Wrapf", "github.com/srvc/fail.Errorf", "github.com/srvc/fail.New", "github.com/srvc/fail.Wrap", } )
Functions ¶
This section is empty.
Types ¶
type Checker ¶ added in v0.3.0
type Checker interface {
Check(ReportFunc)
}
type ReportFunc ¶ added in v0.3.0
Click to show internal directories.
Click to hide internal directories.