mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 20:57: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:
@@ -6,7 +6,7 @@ import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
@@ -320,7 +320,7 @@ func (q *Queries) readTranslationFile(namespace i18n.Namespace, filename string)
|
||||
if err != nil {
|
||||
return nil, zerrors.ThrowInternal(err, "QUERY-93njw", "Errors.TranslationFile.ReadError")
|
||||
}
|
||||
contents, err := ioutil.ReadAll(r)
|
||||
contents, err := io.ReadAll(r)
|
||||
if err != nil {
|
||||
return nil, zerrors.ThrowInternal(err, "QUERY-l0fse", "Errors.TranslationFile.ReadError")
|
||||
}
|
||||
|
Reference in New Issue
Block a user