From a3df4f9790a971bd4f28dc4efb12d52141227765 Mon Sep 17 00:00:00 2001 From: Rui Yang Date: Tue, 2 Aug 2022 13:59:09 -0400 Subject: [PATCH] Fix io/ioutil deprecation error Signed-off-by: Rui Yang --- connector/oidc/oidc.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/connector/oidc/oidc.go b/connector/oidc/oidc.go index cf055f832a..80c23320ae 100644 --- a/connector/oidc/oidc.go +++ b/connector/oidc/oidc.go @@ -8,10 +8,10 @@ import ( "encoding/json" "errors" "fmt" - "io/ioutil" "net" "net/http" "net/url" + "os" "strings" "time" @@ -196,7 +196,7 @@ func newHTTPClient(rootCAs []string, insecureSkipVerify bool) (*http.Client, err tlsConfig := tls.Config{RootCAs: pool, InsecureSkipVerify: insecureSkipVerify} for _, rootCA := range rootCAs { - rootCABytes, err := ioutil.ReadFile(rootCA) + rootCABytes, err := os.ReadFile(rootCA) if err != nil { return nil, fmt.Errorf("failed to read root-ca: %v", err) }