Remove deprecated io/ioutil (#15707)

This commit is contained in:
Klaus Post
2022-09-19 20:05:16 +02:00
committed by GitHub
parent 0b6175b742
commit ff12080ff5
89 changed files with 315 additions and 370 deletions

View File

@@ -24,7 +24,7 @@ import (
"context"
"flag"
"fmt"
"io/ioutil"
"io"
"log"
"net/url"
"os"
@@ -85,7 +85,7 @@ func main() {
if f, err := os.Open(sessionPolicyFile); err != nil {
log.Fatalf("Unable to open session policy file: %v", err)
} else {
bs, err := ioutil.ReadAll(f)
bs, err := io.ReadAll(f)
if err != nil {
log.Fatalf("Error reading session policy file: %v", err)
}

View File

@@ -24,7 +24,7 @@ import (
"context"
"flag"
"fmt"
"io/ioutil"
"io"
"log"
"net/url"
"os"
@@ -82,7 +82,7 @@ func main() {
if f, err := os.Open(sessionPolicyFile); err != nil {
log.Fatalf("Unable to open session policy file: %v", sessionPolicyFile, err)
} else {
bs, err := ioutil.ReadAll(f)
bs, err := io.ReadAll(f)
if err != nil {
log.Fatalf("Error reading session policy file: %v", err)
}