mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 19:07:30 +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:
@@ -5,7 +5,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"hash/fnv"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"net"
|
||||
"net/http"
|
||||
"os"
|
||||
@@ -200,7 +200,7 @@ func metadataWebhookID() (uint16, error) {
|
||||
if resp.StatusCode >= 400 && resp.StatusCode < 600 {
|
||||
return 0, fmt.Errorf("metadata endpoint returned an unsuccessful status code %d", resp.StatusCode)
|
||||
}
|
||||
body, err := ioutil.ReadAll(resp.Body)
|
||||
body, err := io.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
Reference in New Issue
Block a user