Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions pkg/manifests/bundleloader.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package manifests

import (
"fmt"
"io/ioutil"
"os"
"path/filepath"
"strings"
Expand Down Expand Up @@ -189,7 +188,7 @@ func (b *bundleLoader) LoadBundleWalkFunc(path string, f os.FileInfo, err error)
// loadBundle takes the directory that a CSV is in and assumes the rest of the objects in that directory
// are part of the bundle.
func loadBundle(csvName string, dir string) (*Bundle, error) {
files, err := ioutil.ReadDir(dir)
files, err := os.ReadDir(dir)
if err != nil {
return nil, err
}
Expand Down
3 changes: 1 addition & 2 deletions pkg/validation/internal/community.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package internal
import (
"encoding/json"
"fmt"
"io/ioutil"
"os"
"strings"

Expand Down Expand Up @@ -225,7 +224,7 @@ func validateImageFile(checks CommunityOperatorChecks, deprecatedAPImsg string)
return checks
}

b, err := ioutil.ReadFile(checks.indexImagePath)
b, err := os.ReadFile(checks.indexImagePath)
if err != nil {
checks.errs = append(checks.errs, fmt.Errorf("unable to read the index image in the path "+
"(%s). Error : %s", checks.indexImagePath, err))
Expand Down
4 changes: 2 additions & 2 deletions pkg/validation/internal/crd_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package internal

import (
"io/ioutil"
"os"
"testing"

"github.com/operator-framework/api/pkg/validation/errors"
Expand Down Expand Up @@ -57,7 +57,7 @@ func TestValidateCRD(t *testing.T) {
},
}
for _, tt := range table {
b, err := ioutil.ReadFile(tt.filePath)
b, err := os.ReadFile(tt.filePath)
if err != nil {
t.Fatalf("Error reading CRD path %s: %v", tt.filePath, err)
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/validation/internal/csv_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package internal

import (
"fmt"
"io/ioutil"
"os"
"path/filepath"
"testing"

Expand Down Expand Up @@ -121,7 +121,7 @@ func TestValidateCSV(t *testing.T) {
}

for _, c := range cases {
b, err := ioutil.ReadFile(c.csvPath)
b, err := os.ReadFile(c.csvPath)
if err != nil {
t.Fatalf("Error reading CSV path %s: %v", c.csvPath, err)
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/validation/internal/object_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package internal

import (
"io/ioutil"
"os"
"testing"

"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
Expand Down Expand Up @@ -66,7 +66,7 @@ func TestValidateObject(t *testing.T) {

for _, tt := range table {
u := unstructured.Unstructured{}
o, err := ioutil.ReadFile(tt.path)
o, err := os.ReadFile(tt.path)
if err != nil {
t.Fatalf("reading yaml object file: %s", err)
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/validation/internal/operatorgroup_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package internal

import (
"io/ioutil"
"os"
"path/filepath"
"testing"

Expand Down Expand Up @@ -33,7 +33,7 @@ func TestValidateOperatorGroup(t *testing.T) {
},
}
for _, c := range cases {
b, err := ioutil.ReadFile(c.operatorGroupPath)
b, err := os.ReadFile(c.operatorGroupPath)
if err != nil {
t.Fatalf("Error reading OperatorGroup path %s: %v", c.operatorGroupPath, err)
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/validation/internal/operatorhub.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package internal
import (
"encoding/json"
"fmt"
"io/ioutil"
"net/mail"
"net/url"
"os"
"path/filepath"
"strings"

Expand Down Expand Up @@ -313,7 +313,7 @@ func extractCategories(path string) (map[string]struct{}, error) {
return nil, fmt.Errorf("finding category file: %w", err)
}

data, err := ioutil.ReadFile(path)
data, err := os.ReadFile(path)
if err != nil {
return nil, fmt.Errorf("reading category file: %w", err)
}
Expand Down
Loading