CNF-23049: Migrate away from deprecated ioutil#454
Conversation
|
Thanks for taking the time to do this, @sebrandon1! /lgtm |
|
@sebrandon1: This pull request explicitly references no jira issue. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
256fbbd to
0a99191
Compare
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: flavianmissi, sebrandon1 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
this is an internal change. |
0a99191 to
9a5c4bd
Compare
|
New changes are detected. LGTM label has been removed. |
|
/retest |
|
@sebrandon1: This pull request references CNF-23049 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
9a5c4bd to
51e4a13
Compare
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (15)
WalkthroughReplaces deprecated Changesio and os API modernization
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 14 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (14 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
51e4a13 to
eaa0661
Compare
|
@sebrandon1: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
ioutilhas been deprecated since Go 1.16: https://go.dev/doc/go1.16#ioutilTracking issue: redhat-best-practices-for-k8s/telco-bot#52
Core refactoring: Replace
ioutilusage withioandosequivalentsioutil.ReadFilewithos.ReadFilefor reading files, andioutil.WriteFilewithos.WriteFilefor writing files in multiple files, such asdockerregistry.go,config.go, and their respective test files. [1] [2] [3] [4] [5] [6]ioutil.ReadAllwithio.ReadAllfor reading from readers and response bodies, affecting HTTP handlers, test helpers, and utility functions. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]ioutil.TempDirwithos.MkdirTempfor creating temporary directories in tests. [1] [2]ioutil.Discardwithio.Discardfor discarding output in logger setup.ioutilimport statements and updated import blocks accordingly across all affected files. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15]These changes ensure the codebase is compatible with newer Go versions and follows up-to-date language standards.
Summary by CodeRabbit