Skip to content

Commit

Permalink
chore: unnecessary use of fmt.Sprintf
Browse files Browse the repository at this point in the history
  • Loading branch information
testwill committed Oct 27, 2023
1 parent 9142ce5 commit 8852f25
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/ctl/service/r2/store/stub/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ func (s *store) CreateNamespace(
case s.data.ErrorNamespace:
return view.Namespace{}, r2.NewInternalError(fmt.Sprintf("could not create namespace: %s", namespaceID))
case s.data.ConflictNamespace:
return view.Namespace{}, r2.NewVersionError(fmt.Sprintf("namespaces version mismatch"))
return view.Namespace{}, r2.NewVersionError("namespaces version mismatch")
default:
for _, n := range s.data.Namespaces.Namespaces {
if namespaceID == n.ID {
Expand Down
2 changes: 1 addition & 1 deletion src/dbnode/storage/shard_fetch_blocks_metadata_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ func TestShardFetchBlocksMetadataV2WithSeriesCachePolicyNotCacheAll(t *testing.T
if expectedBlock.Checksum == nil {
assert.Nil(t, actualBlock.Checksum)
} else if actualBlock.Checksum == nil {
assert.Fail(t, fmt.Sprintf("expected checksum but no actual checksum"))
assert.Fail(t, "expected checksum but no actual checksum")
} else {
assert.Equal(t, *expectedBlock.Checksum, *actualBlock.Checksum)
}
Expand Down
3 changes: 1 addition & 2 deletions src/query/graphite/graphite/graphite_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ package graphite
import (
"bytes"
"encoding/json"
"fmt"
"math"
"net/http"
"strconv"
Expand Down Expand Up @@ -106,7 +105,7 @@ func (dp RenderDatapoints) Get(i int) (time.Time, float64) {
case time.Time:
return timestamp, value
default:
panic(fmt.Sprintf("unsupported timestamp type"))
panic("unsupported timestamp type")
}
}

Expand Down

0 comments on commit 8852f25

Please sign in to comment.