aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/timakin
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2020-09-15 18:05:35 +0200
committerDmitry Vyukov <dvyukov@google.com>2020-09-15 19:34:30 +0200
commit712de1c63d9db97c81af68cd0dc4372c53d2e57a (patch)
treeae1761fec52c3ae4ddd003a4130ddbda8d0a2d69 /vendor/github.com/timakin
parent298a69c38dd5c8a9bbd7a022e88f4ddbcf885e16 (diff)
vendor/github.com/golangci/golangci-lint: update to v1.31
Diffstat (limited to 'vendor/github.com/timakin')
-rw-r--r--vendor/github.com/timakin/bodyclose/passes/bodyclose/bodyclose.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/vendor/github.com/timakin/bodyclose/passes/bodyclose/bodyclose.go b/vendor/github.com/timakin/bodyclose/passes/bodyclose/bodyclose.go
index 3c702ab5b..145d5409e 100644
--- a/vendor/github.com/timakin/bodyclose/passes/bodyclose/bodyclose.go
+++ b/vendor/github.com/timakin/bodyclose/passes/bodyclose/bodyclose.go
@@ -250,6 +250,20 @@ func (r *runner) isCloseCall(ccall ssa.Instruction) bool {
}
}
}
+
+ if returnOp, ok := cs.(*ssa.Return); ok {
+ for _, resultValue := range returnOp.Results {
+ if resultValue.Type().String() == "io.Closer" {
+ return true
+ }
+ }
+ }
+ }
+ }
+ case *ssa.Return:
+ for _, resultValue := range ccall.Results {
+ if resultValue.Type().String() == "io.ReadCloser" {
+ return true
}
}
}