Skip to content

Commit c39ff8f

Browse files
committed
Refactor: ioutil to io
- Changed ioutil package to io package Signed-off-by: Tanryberdi <tanryberdi@gmail.com> See #17
1 parent 9de0581 commit c39ff8f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

mux_httpserver_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ package mux
55

66
import (
77
"bytes"
8-
"io/ioutil"
8+
"io"
99
"net/http"
1010
"net/http/httptest"
1111
"testing"
@@ -28,7 +28,7 @@ func TestSchemeMatchers(t *testing.T) {
2828
if resp.StatusCode != 200 {
2929
t.Fatalf("expected a status code of 200, got %v", resp.StatusCode)
3030
}
31-
body, err := ioutil.ReadAll(resp.Body)
31+
body, err := io.ReadAll(resp.Body)
3232
if err != nil {
3333
t.Fatalf("unexpected error reading body: %v", err)
3434
}

mux_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"context"
1111
"errors"
1212
"fmt"
13-
"io/ioutil"
13+
"io"
1414
"net/http"
1515
"net/http/httptest"
1616
"net/url"
@@ -2778,7 +2778,7 @@ func TestSubrouterCustomMethodNotAllowed(t *testing.T) {
27782778
tt.Errorf("Expected status code 405 (got %d)", w.Code)
27792779
}
27802780

2781-
b, err := ioutil.ReadAll(w.Body)
2781+
b, err := io.ReadAll(w.Body)
27822782
if err != nil {
27832783
tt.Errorf("failed to read body: %v", err)
27842784
}

0 commit comments

Comments
 (0)