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
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (15)
✨ Finishing Touches🧪 Generate unit tests (beta)
Review rate limit: 0/10 reviews remaining, refill in 2 minutes and 11 seconds. Comment |
|
@sebrandon1: all tests passed! 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.