From a7201418abc1e934d9a209010ac109a957402261 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Wed, 29 Dec 2021 13:19:45 +0300 Subject: [PATCH] Fix linter issues Signed-off-by: Evgenii Stratonikov --- gf127/avx/gf127.go | 6 ++---- tz/avx.go | 2 +- tz/sl2.go | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/gf127/avx/gf127.go b/gf127/avx/gf127.go index 4072981..e77aeb2 100644 --- a/gf127/avx/gf127.go +++ b/gf127/avx/gf127.go @@ -16,10 +16,8 @@ type GF127 = gf127.GF127 const msb64 = uint64(1) << 63 -var ( - // x127x63 represents x^127 + x^63. Used in assembly file. - x127x63 = GF127{msb64, msb64} -) +// x127x63 represents x^127 + x^63. Used in assembly file. +var x127x63 = GF127{msb64, msb64} //nolint:deadcode,varcheck // Add sets c to a+b. func Add(a, b, c *GF127) diff --git a/tz/avx.go b/tz/avx.go index 09793ef..913c7e2 100644 --- a/tz/avx.go +++ b/tz/avx.go @@ -17,7 +17,7 @@ var _ hash.Hash = (*digest)(nil) var ( minmax = [2]GF127{{0, 0}, {math.MaxUint64, math.MaxUint64}} - x127x63 = GF127{1 << 63, 1 << 63} + x127x63 = GF127{1 << 63, 1 << 63} //nolint:deadcode,varcheck ) func newAVX() *digest { diff --git a/tz/sl2.go b/tz/sl2.go index e0a4d8a..f7ca1d4 100644 --- a/tz/sl2.go +++ b/tz/sl2.go @@ -54,7 +54,7 @@ func (c *sl2) UnmarshalBinary(data []byte) (err error) { return } -func (c *sl2) mulStrassen(a, b *sl2, x *[8]GF127) *sl2 { +func (c *sl2) mulStrassen(a, b *sl2, x *[8]GF127) *sl2 { //nolint:unused // strassen algorithm avx.Add(&a[0][0], &a[1][1], &x[0]) avx.Add(&b[0][0], &b[1][1], &x[1])