diff --git a/internal/archiver/testing_test.go b/internal/archiver/testing_test.go index e11b86250..6f6904e3f 100644 --- a/internal/archiver/testing_test.go +++ b/internal/archiver/testing_test.go @@ -217,7 +217,7 @@ func TestTestWalkFiles(t *testing.T) { return err } - got[p] = fmt.Sprintf("%v", item) + got[p] = fmt.Sprint(item) return nil }) diff --git a/internal/cache/file_test.go b/internal/cache/file_test.go index 3e92c1d96..17fc5048f 100644 --- a/internal/cache/file_test.go +++ b/internal/cache/file_test.go @@ -97,7 +97,7 @@ func TestFiles(t *testing.T) { } for _, tpe := range tests { - t.Run(fmt.Sprintf("%v", tpe), func(t *testing.T) { + t.Run(tpe.String(), func(t *testing.T) { ids := generateRandomFiles(t, tpe, c) id := randomID(ids) diff --git a/internal/restic/blob.go b/internal/restic/blob.go index 4ac149adb..260f40fde 100644 --- a/internal/restic/blob.go +++ b/internal/restic/blob.go @@ -114,11 +114,7 @@ func (h BlobHandles) Less(i, j int) bool { continue } - if b < h[j].ID[k] { - return true - } - - return false + return b < h[j].ID[k] } return h[i].Type < h[j].Type @@ -133,5 +129,5 @@ func (h BlobHandles) String() string { for _, e := range h { elements = append(elements, e.String()) } - return fmt.Sprintf("%v", elements) + return fmt.Sprint(elements) } diff --git a/internal/restic/ids.go b/internal/restic/ids.go index cc5ad18da..b3e6b6f22 100644 --- a/internal/restic/ids.go +++ b/internal/restic/ids.go @@ -65,5 +65,5 @@ func (ids IDs) String() string { for _, id := range ids { elements = append(elements, shortID(id)) } - return fmt.Sprintf("%v", elements) + return fmt.Sprint(elements) } diff --git a/internal/restic/tag_list.go b/internal/restic/tag_list.go index 4d57cb14b..b293b14f7 100644 --- a/internal/restic/tag_list.go +++ b/internal/restic/tag_list.go @@ -37,7 +37,7 @@ func (TagList) Type() string { type TagLists []TagList func (l TagLists) String() string { - return fmt.Sprintf("%v", []TagList(l)) + return fmt.Sprint([]TagList(l)) } // Flatten returns the list of all tags provided in TagLists