Skip to content

Commit be60a91

Browse files
committed
Moving golnagci-lint to v1.46
1 parent a4b8552 commit be60a91

File tree

2 files changed

+6
-12
lines changed

2 files changed

+6
-12
lines changed

.github/workflows/ci-actions.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Linting
2424
uses: golangci/golangci-lint-action@v3
2525
with:
26-
version: v1.45
26+
version: v1.46
2727
args: --config=./.etc/golangci.yml ./...
2828
- name: Check shadowing
2929
run: |

ecc/fourq/point_test.go

+5-11
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ func TestScalarMult(t *testing.T) {
125125

126126
func TestScalar(t *testing.T) {
127127
const testTimes = 1 << 12
128-
var x, xx [5]uint64
128+
var xx [5]uint64
129129
two256 := big.NewInt(1)
130130
two256.Lsh(two256, 256)
131131
two64 := big.NewInt(1)
@@ -137,9 +137,7 @@ func TestScalar(t *testing.T) {
137137
for i := 0; i < testTimes; i++ {
138138
bigX, _ := rand.Int(rand.Reader, two256)
139139
conv.BigInt2Uint64Le(xx[:], bigX)
140-
for j := range xx {
141-
x[j] = xx[j]
142-
}
140+
x := xx
143141
bigY, _ := rand.Int(rand.Reader, two64)
144142
y := bigY.Int64()
145143
bigY.SetInt64(y)
@@ -160,9 +158,7 @@ func TestScalar(t *testing.T) {
160158
for i := 0; i < testTimes; i++ {
161159
bigX, _ := rand.Int(rand.Reader, two256)
162160
conv.BigInt2Uint64Le(xx[:], bigX)
163-
for j := range xx {
164-
x[j] = xx[j]
165-
}
161+
x := xx
166162
bigY, _ := rand.Int(rand.Reader, two64)
167163
y := bigY.Int64()
168164
bigY.SetInt64(y)
@@ -182,9 +178,7 @@ func TestScalar(t *testing.T) {
182178
for i := 0; i < testTimes; i++ {
183179
bigX, _ := rand.Int(rand.Reader, two256)
184180
conv.BigInt2Uint64Le(xx[:], bigX)
185-
for j := range xx {
186-
x[j] = xx[j]
187-
}
181+
x := xx
188182

189183
condAddOrderN(&x)
190184
got := conv.Uint64Le2BigInt(x[:])
@@ -219,7 +213,7 @@ func TestScalar(t *testing.T) {
219213
}
220214

221215
if got.Cmp(want) != 0 {
222-
test.ReportError(t, got, want, x)
216+
test.ReportError(t, got, want, k)
223217
}
224218
}
225219
})

0 commit comments

Comments
 (0)