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

@@ -8,7 +8,6 @@ import (
"encoding/json"
"fmt"
"io"
"io/ioutil"
"net/http"
)
@@ -44,7 +43,7 @@ func (r *Response) Error() error {
}
r.Body.Close()
r.Body = ioutil.NopCloser(bodyBuf)
r.Body = io.NopCloser(bodyBuf)
ns := r.Header.Get(NamespaceHeaderName)
// Build up the error object