Skip to content

Commit 15dc59f

Browse files
committed
chore: unnecessary use of fmt.Sprintf
1 parent 4feb762 commit 15dc59f

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

src/ctl/service/r2/store/stub/store.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ func (s *store) CreateNamespace(
410410
case s.data.ErrorNamespace:
411411
return view.Namespace{}, r2.NewInternalError(fmt.Sprintf("could not create namespace: %s", namespaceID))
412412
case s.data.ConflictNamespace:
413-
return view.Namespace{}, r2.NewVersionError(fmt.Sprintf("namespaces version mismatch"))
413+
return view.Namespace{}, r2.NewVersionError("namespaces version mismatch")
414414
default:
415415
for _, n := range s.data.Namespaces.Namespaces {
416416
if namespaceID == n.ID {

src/dbnode/storage/shard_fetch_blocks_metadata_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ func TestShardFetchBlocksMetadataV2WithSeriesCachePolicyNotCacheAll(t *testing.T
290290
if expectedBlock.Checksum == nil {
291291
assert.Nil(t, actualBlock.Checksum)
292292
} else if actualBlock.Checksum == nil {
293-
assert.Fail(t, fmt.Sprintf("expected checksum but no actual checksum"))
293+
assert.Fail(t, "expected checksum but no actual checksum")
294294
} else {
295295
assert.Equal(t, *expectedBlock.Checksum, *actualBlock.Checksum)
296296
}

src/query/graphite/graphite/graphite_types.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ package graphite
2323
import (
2424
"bytes"
2525
"encoding/json"
26-
"fmt"
2726
"math"
2827
"net/http"
2928
"strconv"
@@ -106,7 +105,7 @@ func (dp RenderDatapoints) Get(i int) (time.Time, float64) {
106105
case time.Time:
107106
return timestamp, value
108107
default:
109-
panic(fmt.Sprintf("unsupported timestamp type"))
108+
panic("unsupported timestamp type")
110109
}
111110
}
112111

0 commit comments

Comments
 (0)