From 6365dfe9426793cb7e0df1be662a4123c84b02ff Mon Sep 17 00:00:00 2001 From: Atsushi Watanabe Date: Fri, 12 May 2023 11:12:21 +0900 Subject: [PATCH] Fix go vet error (#338) --- .github/workflows/ci.yml | 2 ++ s3sync_test.go | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 95862ca..e45af1c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,6 +26,8 @@ jobs: - uses: actions/setup-go@v4 with: go-version: ${{ matrix.go_version }} + - name: Go vet + run: go vet ./... - name: Test run: | # Start mock s3 service diff --git a/s3sync_test.go b/s3sync_test.go index 96d3d54..5518dc8 100644 --- a/s3sync_test.go +++ b/s3sync_test.go @@ -3,7 +3,7 @@ // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, @@ -481,7 +481,7 @@ func TestDryRun(t *testing.T) { t.Error("File must not be downloaded on dry-run") } stats := m.GetStatistics() - if !reflect.DeepEqual(stats, SyncStatistics{}) { + if !reflect.DeepEqual(&stats, &SyncStatistics{}) { t.Error("Statistics must not change on a dry-run") } @@ -528,7 +528,7 @@ func TestDryRun(t *testing.T) { t.Error("Unexpected key", objs[0].path) } stats := m.GetStatistics() - if !reflect.DeepEqual(stats, SyncStatistics{}) { + if !reflect.DeepEqual(&stats, &SyncStatistics{}) { t.Error("Statistics must not change on a dry-run") } })