mirror of
https://github.com/int128/kubelogin.git
synced 2026-02-14 16:39:51 +00:00
refactor: replace io/ioutil with os, io package (#832)
This commit is contained in:
@@ -4,7 +4,7 @@ package httpdriver
|
||||
import (
|
||||
"context"
|
||||
"crypto/tls"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"net/http"
|
||||
"strings"
|
||||
"testing"
|
||||
@@ -48,7 +48,7 @@ func (c *client) Open(url string) error {
|
||||
if resp.StatusCode != 200 {
|
||||
c.t.Errorf("StatusCode wants 200 but %d", resp.StatusCode)
|
||||
}
|
||||
b, err := ioutil.ReadAll(resp.Body)
|
||||
b, err := io.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
c.t.Errorf("could not read body: %s", err)
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user