chore: fix deprecated ioutil nopcloser (#27650)

Signed-off-by: idnandre <andre@idntimes.com>
This commit is contained in:
idnandre
2024-07-04 00:38:34 +07:00
committed by GitHub
parent 3229cf192b
commit b833d4714d
10 changed files with 17 additions and 19 deletions

View File

@@ -9,7 +9,7 @@ import (
"crypto/tls"
"encoding/json"
"errors"
"io/ioutil"
"io"
"net/http"
"net/http/httptest"
"net/textproto"
@@ -885,7 +885,7 @@ func TestHandler_Parse_Form(t *testing.T) {
if err != nil {
t.Fatal(err)
}
req.Body = ioutil.NopCloser(strings.NewReader(values.Encode()))
req.Body = io.NopCloser(strings.NewReader(values.Encode()))
req.Header.Set("x-vault-token", cluster.RootToken)
req.Header.Set("content-type", "application/x-www-form-urlencoded")
resp, err := c.Do(req)