mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 21:07:31 +00:00
chore: Replace deprecated io/ioutil
functions with recommended alternatives (#9542)
# Which Problems Are Solved - The `io/ioutil` package was deprecated in Go 1.16. - Reference: https://go.dev/doc/go1.16#ioutil # How the Problems Are Solved - Replaced deprecated functions with their recommended alternatives: - `ioutil.ReadFile` → `os.ReadFile` - `ioutil.ReadAll` → `io.ReadAll` - `ioutil.NopCloser` → `io.NopCloser`
This commit is contained in:
@@ -3,7 +3,7 @@ package command
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"net/http"
|
||||
"testing"
|
||||
|
||||
@@ -882,7 +882,7 @@ func newTestClient(httpStatus int, metadata []byte) *http.Client {
|
||||
fn := roundTripperFunc(func(req *http.Request) *http.Response {
|
||||
return &http.Response{
|
||||
StatusCode: httpStatus,
|
||||
Body: ioutil.NopCloser(bytes.NewBuffer(metadata)),
|
||||
Body: io.NopCloser(bytes.NewBuffer(metadata)),
|
||||
Header: make(http.Header), //must be non-nil value
|
||||
}
|
||||
})
|
||||
|
Reference in New Issue
Block a user