Skip to content

Conversation

@sebrandon1
Copy link
Member

ioutil has been deprecated since Go 1.16: https://go.dev/doc/go1.16#ioutil

Tracking issue: redhat-best-practices-for-k8s/telco-bot#52

Modernization of file and stream operations:

  • Replaced all instances of ioutil.ReadFile and ioutil.WriteFile with os.ReadFile and os.WriteFile in production code and tests, ensuring up-to-date file I/O operations. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16]

  • Updated usage of ioutil.TempFile and ioutil.TempDir to os.CreateTemp and os.MkdirTemp for creating temporary files and directories. [1] [2] [3]

  • Changed ioutil.NopCloser and ioutil.Discard to their io equivalents (io.NopCloser, io.Discard) for stream handling. [1] [2]

Codebase cleanup:

These updates ensure the codebase is compatible with the latest Go standards and avoids deprecated APIs.

@openshift-ci openshift-ci bot requested a review from gcs278 November 24, 2025 23:00
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 24, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign knobunc for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot requested a review from knobunc November 24, 2025 23:00
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 25, 2025

@sebrandon1: all tests passed!

Full PR test history. Your PR dashboard.

Details

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 kubernetes-sigs/prow repository. I understand the commands that are listed here.

@bentito
Copy link
Contributor

bentito commented Jan 28, 2026

/assign

@bentito
Copy link
Contributor

bentito commented Jan 28, 2026

/assign @davidesalerno

@sebrandon1
Copy link
Member Author

@sebrandon1 sebrandon1 changed the title Migrate away from deprecated ioutil NE-2468: Migrate away from deprecated ioutil Jan 28, 2026
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jan 28, 2026
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Jan 28, 2026

@sebrandon1: This pull request references NE-2468 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 "4.22.0" version, but no target version was set.

Details

In response to this:

ioutil has been deprecated since Go 1.16: https://go.dev/doc/go1.16#ioutil

Tracking issue: redhat-best-practices-for-k8s/telco-bot#52

Modernization of file and stream operations:

  • Replaced all instances of ioutil.ReadFile and ioutil.WriteFile with os.ReadFile and os.WriteFile in production code and tests, ensuring up-to-date file I/O operations. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16]

  • Updated usage of ioutil.TempFile and ioutil.TempDir to os.CreateTemp and os.MkdirTemp for creating temporary files and directories. [1] [2] [3]

  • Changed ioutil.NopCloser and ioutil.Discard to their io equivalents (io.NopCloser, io.Discard) for stream handling. [1] [2]

Codebase cleanup:

These updates ensure the codebase is compatible with the latest Go standards and avoids deprecated APIs.

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.

@lihongan
Copy link
Contributor

cc @ShudiLi

@ShudiLi
Copy link
Member

ShudiLi commented Jan 30, 2026

/label qe-approved
/verified by ci-prow

shudili@shudili-mac pkg % grep -Rn ioutil .
shudili@shudili-mac pkg %

@openshift-ci openshift-ci bot added the qe-approved Signifies that QE has signed off on this PR label Jan 30, 2026
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Jan 30, 2026

@sebrandon1: This pull request references NE-2468 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 "4.22.0" version, but no target version was set.

Details

In response to this:

ioutil has been deprecated since Go 1.16: https://go.dev/doc/go1.16#ioutil

Tracking issue: redhat-best-practices-for-k8s/telco-bot#52

Modernization of file and stream operations:

  • Replaced all instances of ioutil.ReadFile and ioutil.WriteFile with os.ReadFile and os.WriteFile in production code and tests, ensuring up-to-date file I/O operations. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16]

  • Updated usage of ioutil.TempFile and ioutil.TempDir to os.CreateTemp and os.MkdirTemp for creating temporary files and directories. [1] [2] [3]

  • Changed ioutil.NopCloser and ioutil.Discard to their io equivalents (io.NopCloser, io.Discard) for stream handling. [1] [2]

Codebase cleanup:

These updates ensure the codebase is compatible with the latest Go standards and avoids deprecated APIs.

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.

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Jan 30, 2026
@openshift-ci-robot
Copy link
Contributor

@ShudiLi: This PR has been marked as verified by ci-prow.

Details

In response to this:

/label qe-approved
/verified by ci-prow

shudili@shudili-mac pkg % grep -Rn ioutil .
shudili@shudili-mac pkg %

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. qe-approved Signifies that QE has signed off on this PR verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants