We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent add7445 commit 543e79fCopy full SHA for 543e79f
wrapmsg.go
@@ -19,7 +19,7 @@ var Analyzer = &analysis.Analyzer{
19
}
20
21
func isErrorf(call *ssa.Call) bool {
22
- if f, ok := ssautil.Operands(call)[0].(*ssa.Function); ok && f.Pkg.Pkg.Path() == "testing" {
+ if f, _ := ssautil.Operands(call)[0].(*ssa.Function); f != nil && f.Pkg != nil && f.Pkg.Pkg != nil && f.Pkg.Pkg.Path() == "testing" {
23
// avoid targeting (*testing.T).Errorf
24
return false
25
0 commit comments