Skip to content

Commit ec1e1a4

Browse files
committed
Remove old implementations
1 parent fefb6a9 commit ec1e1a4

File tree

2 files changed

+27
-319
lines changed

2 files changed

+27
-319
lines changed

analyzer.go

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,33 @@ var Analyzer = &analysis.Analyzer{
2020
Run: runAnalyze,
2121
}
2222

23+
var (
24+
// WrapperFuncList contains "path/to/pkg.Funcname" strings that adds a context to errors.
25+
WrapperFuncList = []string{
26+
// stdlibs
27+
"errors.New",
28+
"fmt.Errorf",
29+
30+
// github.com/pkg/errors
31+
"github.com/pkg/errors.Errorf",
32+
"github.com/pkg/errors.New",
33+
"github.com/pkg/errors.WithMessage",
34+
"github.com/pkg/errors.WithStack",
35+
"github.com/pkg/errors.Wrap",
36+
"github.com/pkg/errors.Wrapf",
37+
38+
// github.com/srvc/fail
39+
"github.com/srvc/fail.Errorf",
40+
"github.com/srvc/fail.New",
41+
"github.com/srvc/fail.Wrap",
42+
}
43+
)
44+
45+
type errIdent struct {
46+
*ast.Ident
47+
wrapped bool
48+
}
49+
2350
var wrapperFuncSet map[string]struct{}
2451

2552
func init() {

detector.go

Lines changed: 0 additions & 319 deletions
This file was deleted.

0 commit comments

Comments
 (0)