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)) }