remove deprecated use of ioutil (#5205)

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
Jörn Friedrich Dreyer
2022-12-08 14:44:53 +01:00
committed by GitHub
parent 46cb910637
commit 53d15d329e
24 changed files with 57 additions and 67 deletions
+3 -3
View File
@@ -4,7 +4,7 @@ import (
"bytes"
"context"
"fmt"
"io/ioutil"
"io"
"net/http"
"os"
"path"
@@ -143,7 +143,7 @@ func createTemporaryClientsConfig(filePath, ocisURL string, clients []config.Cli
defer confOnDisk.Close()
err = ioutil.WriteFile(filePath, conf, 0600)
err = os.WriteFile(filePath, conf, 0600)
if err != nil {
return err
}
@@ -253,7 +253,7 @@ func (idp IDP) Index() http.HandlerFunc {
idp.logger.Fatal().Err(err).Msg("Could not open index template")
}
template, err := ioutil.ReadAll(f)
template, err := io.ReadAll(f)
if err != nil {
idp.logger.Fatal().Err(err).Msg("Could not read index template")
}