cleanup deprecated package io/ioutil (#4920)

Signed-off-by: zounengren <zouyee1989@gmail.com>
This commit is contained in:
Zou Nengren
2021-10-13 15:30:31 +08:00
committed by GitHub
parent 44fcca0e0d
commit 5191959bd7
26 changed files with 53 additions and 72 deletions

View File

@@ -2,7 +2,7 @@ package health
import (
"fmt"
"io/ioutil"
"io"
"net/http"
"testing"
"time"
@@ -25,7 +25,7 @@ func TestHealth(t *testing.T) {
if response.StatusCode != 200 {
t.Errorf("Invalid status code: expecting '200', got '%d'", response.StatusCode)
}
content, err := ioutil.ReadAll(response.Body)
content, err := io.ReadAll(response.Body)
if err != nil {
t.Fatalf("Unable to get response body from %s: %v", address, err)
}