From 7aa7acd926777ae149142f6dab9b15f4968f7071 Mon Sep 17 00:00:00 2001 From: Ivan Andreev Date: Thu, 4 Mar 2021 14:26:48 +0300 Subject: [PATCH] address stringent ineffectual assignment check in golangci-lint (#5093) --- backend/cache/cache_internal_test.go | 2 +- backend/chunker/chunker_internal_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/cache/cache_internal_test.go b/backend/cache/cache_internal_test.go index 1cf6603e6..d5351899a 100644 --- a/backend/cache/cache_internal_test.go +++ b/backend/cache/cache_internal_test.go @@ -1034,7 +1034,7 @@ func (r *run) updateObjectRemote(t *testing.T, f fs.Fs, remote string, data1 []b objInfo1 := object.NewStaticObjectInfo(remote, time.Now(), int64(len(data1)), true, nil, f) objInfo2 := object.NewStaticObjectInfo(remote, time.Now(), int64(len(data2)), true, nil, f) - obj, err = f.Put(context.Background(), in1, objInfo1) + _, err = f.Put(context.Background(), in1, objInfo1) require.NoError(t, err) obj, err = f.NewObject(context.Background(), remote) require.NoError(t, err) diff --git a/backend/chunker/chunker_internal_test.go b/backend/chunker/chunker_internal_test.go index 14e2e6f85..5b20fcb78 100644 --- a/backend/chunker/chunker_internal_test.go +++ b/backend/chunker/chunker_internal_test.go @@ -495,11 +495,11 @@ func testPreventCorruption(t *testing.T, f *Fs) { billyChunk4Name := billyChunkName(4) _, err = f.base.NewObject(ctx, billyChunk4Name) require.NoError(t, err) - billyChunk4, err := f.NewObject(ctx, billyChunk4Name) + _, err = f.NewObject(ctx, billyChunk4Name) assertOverlapError(err) f.opt.FailHard = false - billyChunk4, err = f.NewObject(ctx, billyChunk4Name) + billyChunk4, err := f.NewObject(ctx, billyChunk4Name) assert.NoError(t, err) require.NotNil(t, billyChunk4)