From 9a52a74e4733ded53016004d73cd16a5c28ca3d9 Mon Sep 17 00:00:00 2001 From: guoguangwu Date: Mon, 10 Jul 2023 15:54:34 +0800 Subject: [PATCH] chore: unnecessary use of fmt.Sprintf --- flate/writer_test.go | 2 +- s2/index_test.go | 4 ++-- s2/writer_test.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/flate/writer_test.go b/flate/writer_test.go index 0a011a9220..766ab6b900 100644 --- a/flate/writer_test.go +++ b/flate/writer_test.go @@ -30,7 +30,7 @@ func TestWriterMemUsage(t *testing.T) { t.Logf("%s: Memory Used: %dKB, %d allocs", t.Name(), (after.HeapInuse-before.HeapInuse)/1024, after.HeapObjects-before.HeapObjects) } data := make([]byte, 100000) - t.Run(fmt.Sprint("stateless"), func(t *testing.T) { + t.Run("stateless", func(t *testing.T) { testMem(t, func() { StatelessDeflate(io.Discard, data, false, nil) }) diff --git a/s2/index_test.go b/s2/index_test.go index 9d53f53ba5..e644fcdf83 100644 --- a/s2/index_test.go +++ b/s2/index_test.go @@ -235,7 +235,7 @@ func TestSeeking(t *testing.T) { }) } // Test seek current - t.Run(fmt.Sprintf("seekCurrent"), func(t *testing.T) { + t.Run("seekCurrent", func(t *testing.T) { dec := s2.NewReader(io.ReadSeeker(bytes.NewReader(compressed.Bytes()))) seeker, err := dec.ReadSeeker(true, index) @@ -269,7 +269,7 @@ func TestSeeking(t *testing.T) { } }) // Test ReadAt - t.Run(fmt.Sprintf("ReadAt"), func(t *testing.T) { + t.Run("ReadAt", func(t *testing.T) { dec := s2.NewReader(io.ReadSeeker(bytes.NewReader(compressed.Bytes()))) seeker, err := dec.ReadSeeker(true, index) diff --git a/s2/writer_test.go b/s2/writer_test.go index e54077e782..92f5066f89 100644 --- a/s2/writer_test.go +++ b/s2/writer_test.go @@ -367,7 +367,7 @@ func TestIndex(t *testing.T) { } }) } - t.Run(fmt.Sprintf("ReadAt"), func(t *testing.T) { + t.Run("ReadAt", func(t *testing.T) { // Read it from a seekable stream dec = NewReader(bytes.NewReader(compressed))