From 2fba3d707aee35914734808c3db2ac3b0cb74c95 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sun, 21 May 2023 13:59:54 +0200 Subject: Update `firstDeferEndPos` name Clarify intended contents. --- defererr.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'defererr.go') 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 -- cgit v1.2.3