From d6faeb8cc455a8ddcf9df94eac678829b1787272 Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Tue, 12 Oct 2021 12:09:55 +0200 Subject: [PATCH] fix: new rules --- pkg/golinters/goanalysis/runner_loadingpackage.go | 2 +- pkg/result/issue.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/golinters/goanalysis/runner_loadingpackage.go b/pkg/golinters/goanalysis/runner_loadingpackage.go index 9fa396854ee0..f9a43f3f5cf1 100644 --- a/pkg/golinters/goanalysis/runner_loadingpackage.go +++ b/pkg/golinters/goanalysis/runner_loadingpackage.go @@ -492,6 +492,6 @@ func sizeOfReflectValueTreeBytes(rv reflect.Value, visitedPtrs map[uintptr]struc case reflect.Invalid: return 0 default: - panic("unknown rv of type " + fmt.Sprint(rv)) + panic("unknown rv of type " + rv.String()) } } diff --git a/pkg/result/issue.go b/pkg/result/issue.go index 707a2b17cd95..1e8cd30524b0 100644 --- a/pkg/result/issue.go +++ b/pkg/result/issue.go @@ -92,7 +92,7 @@ func (i *Issue) Fingerprint() string { } hash := md5.New() //nolint:gosec - _, _ = hash.Write([]byte(fmt.Sprintf("%s%s%s", i.Pos.Filename, i.Text, firstLine))) + _, _ = fmt.Fprintf(hash, "%s%s%s", i.Pos.Filename, i.Text, firstLine) return fmt.Sprintf("%X", hash.Sum(nil)) }