Skip to content

Commit 27f2282

Browse files
TheMeierzwopir
authored andcommitted
use buf.String() instead of string(buf.Bytes())
1 parent 352660c commit 27f2282

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

collector/cluster_settings_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func TestClusterSettingsStats(t *testing.T) {
2323
f, _ := os.Open(filename)
2424
io.Copy(buf, f)
2525
f.Close()
26-
out := string(buf.Bytes())
26+
out := string(buf.String())
2727
for hn, handler := range map[string]http.Handler{
2828
"plain": http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
2929
fmt.Fprintln(w, out)
@@ -62,7 +62,7 @@ func TestClusterMaxShardsPerNode(t *testing.T) {
6262
f, _ := os.Open(filename)
6363
io.Copy(buf, f)
6464
f.Close()
65-
out := string(buf.Bytes())
65+
out := string(buf.String())
6666
for hn, handler := range map[string]http.Handler{
6767
"plain": http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
6868
fmt.Fprintln(w, out)

0 commit comments

Comments
 (0)