Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace ioutil with io and os for hack #106020

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 3 additions & 4 deletions hack/conformance/check_conformance_test_requirements.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import (
"bytes"
"errors"
"fmt"
"io/ioutil"
"os"
"regexp"

Expand All @@ -46,7 +45,7 @@ func checkAllProviders(e2eFile string) error {
regEndConformance := regexp.MustCompile(patternEndConformance)
regSkip := regexp.MustCompile(patternSkip)

fileInput, err := ioutil.ReadFile(e2eFile)
fileInput, err := os.ReadFile(e2eFile)
if err != nil {
return fmt.Errorf("Failed to read file %s: %w", e2eFile, err)
}
Expand Down Expand Up @@ -84,7 +83,7 @@ func checkAllProviders(e2eFile string) error {
func processFile(e2ePath string) error {
regGoFile := regexp.MustCompile(`.*\.go`)

files, err := ioutil.ReadDir(e2ePath)
files, err := os.ReadDir(e2ePath)
if err != nil {
return fmt.Errorf("Failed to read dir %s: %w", e2ePath, err)
}
Expand All @@ -111,7 +110,7 @@ func processDir(e2ePath string) error {
}

// Search sub directories if exist
files, err := ioutil.ReadDir(e2ePath)
files, err := os.ReadDir(e2ePath)
if err != nil {
return fmt.Errorf("Failed to read dir %s: %w", e2ePath, err)
}
Expand Down