Skip to content

Commit

Permalink
chore: use io.ReadAll instead of io.ioutil.ReadAll
Browse files Browse the repository at this point in the history
  • Loading branch information
aslafy-z committed May 22, 2023
1 parent 3dc9e1d commit e9ea849
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/sdk/resourcebuilder/component.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package resourcebuilder
import (
"context"
"fmt"
"io/ioutil"
"io"

"emperror.dev/errors"
extensionsv1alpha1 "github.com/banzaicloud/logging-operator/pkg/sdk/extensions/api/v1alpha1"
Expand Down Expand Up @@ -218,7 +218,7 @@ func CRD(group string, kind string, modifiers ...CRDModifier) (runtime.Object, r
if err != nil {
return nil, nil, errors.WrapIff(err, "failed to open %s crd", kind)
}
bytes, err := ioutil.ReadAll(crdFile)
bytes, err := io.ReadAll(crdFile)
if err != nil {
return nil, nil, errors.WrapIff(err, "failed to read %s crd", kind)
}
Expand Down Expand Up @@ -377,7 +377,7 @@ func ClusterRole(parent reconciler.ResourceOwner, config ComponentConfig) (runti
if err != nil {
return nil, nil, errors.WrapIf(err, "failed to open role.yaml")
}
roleAsByte, err := ioutil.ReadAll(roleFile)
roleAsByte, err := io.ReadAll(roleFile)
if err != nil {
return nil, nil, err
}
Expand Down

0 comments on commit e9ea849

Please sign in to comment.