aboutsummaryrefslogtreecommitdiffstats
path: root/defererr.go
diff options
context:
space:
mode:
authorTeddy Wing2023-05-21 13:59:54 +0200
committerTeddy Wing2023-05-21 13:59:54 +0200
commit2fba3d707aee35914734808c3db2ac3b0cb74c95 (patch)
treee8676835f8082d1f23d2c9d0a3a63e105f33d5b1 /defererr.go
parent859d89a12cfb3a4b92dc292a43daa0641acf69c3 (diff)
downloadgodefererr-2fba3d707aee35914734808c3db2ac3b0cb74c95.tar.bz2
Update `firstDeferEndPos` name
Clarify intended contents.
Diffstat (limited to 'defererr.go')
-rw-r--r--defererr.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/defererr.go b/defererr.go
index 837fa90..e25ede7 100644
--- a/defererr.go
+++ b/defererr.go
@@ -74,7 +74,7 @@ func checkFunctions(pass *analysis.Pass, node ast.Node) {
// Idea: Set this to the end token.Pos of the first `defer`
// closure. Look for `return`s after that in funcDecl.Body and
// ensure they include the error variable.
- firstDeferEndPos := -1
+ firstErrorDeferEndPos := -1
// Is it possible to generalise this to other types, and look for
// anything set in `defer` with the same type as a result in the