From cf77731927247e3178c90e403cef12ce12b6b4eb Mon Sep 17 00:00:00 2001 From: Sven Anderson Date: Thu, 7 Oct 2021 12:36:06 +0900 Subject: [PATCH] contrib/implements: remove some linter noise Signed-off-by: Sven Anderson --- contrib/implements/internal/implements/gosrc.go | 4 ++-- contrib/implements/main.go | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/contrib/implements/internal/implements/gosrc.go b/contrib/implements/internal/implements/gosrc.go index 33d586f..c8272b9 100644 --- a/contrib/implements/internal/implements/gosrc.go +++ b/contrib/implements/internal/implements/gosrc.go @@ -1,3 +1,4 @@ +// Package implements is internal package implements import ( @@ -37,7 +38,6 @@ type goFunction struct { fullName string comment string implementsCFunc string - callsCFunc string isDeprecated bool isPreview bool @@ -114,7 +114,7 @@ func (v *visitor) checkCalled(s *ast.SelectorExpr) { if !ok { return } - if "C" == ident.String() { + if ident.String() == "C" { cname := s.Sel.String() if ignoreCCalls[cname] { return diff --git a/contrib/implements/main.go b/contrib/implements/main.go index 2070167..eee6a8e 100644 --- a/contrib/implements/main.go +++ b/contrib/implements/main.go @@ -82,7 +82,7 @@ func main() { if err != nil { abort(err.Error()) } - defer f.Close() + defer func() { _ = f.Close() }() rpts = append(rpts, implements.NewJSONReport(o, f)) } switch { @@ -93,7 +93,7 @@ func main() { if err != nil { abort(err.Error()) } - defer f.Close() + defer func() { _ = f.Close() }() rpts = append(rpts, implements.NewTextReport(o, f)) } if len(rpts) == 0 { @@ -136,6 +136,6 @@ func main() { } } for _, r := range rpts { - r.Done() + _ = r.Done() } }