Skip to content

chore: Replace deprecated ioutil.ReadFile and ioutil.ReadDir in workspaceenv_test#1412

Merged
rohanKanojia merged 1 commit intodevfile:mainfrom
rohankanojia-forks:pr/fix-deprecated-method
May 7, 2025
Merged

chore: Replace deprecated ioutil.ReadFile and ioutil.ReadDir in workspaceenv_test#1412
rohanKanojia merged 1 commit intodevfile:mainfrom
rohankanojia-forks:pr/fix-deprecated-method

Conversation

@rohanKanojia
Copy link
Copy Markdown
Member

@rohanKanojia rohanKanojia commented Apr 16, 2025

What does this PR do?

Updated code to use os.ReadFile and os.ReadDir, as ioutil package was deprecated in Go 1.16 (See ioutil godoc).

Deprecated: As of Go 1.16, the same functionality is now provided by package io or package os, and those implementations should be preferred in new code.

What issues does this PR fix or reference?

This is just a minor code smell fix, it is not related to any issue.

Is it tested? How?

I've only verified it via IDE that code is not breaking any build.

PR Checklist

  • E2E tests pass (when PR is ready, comment /test v8-devworkspace-operator-e2e, v8-che-happy-path to trigger)
    • v8-devworkspace-operator-e2e: DevWorkspace e2e test
    • v8-che-happy-path: Happy path for verification integration with Che

…rkspaceenv_test

Updated code to use `os.ReadFile` and `os.ReadDir`, as `ioutil` package
was deprecated in Go 1.16.

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Apr 16, 2025

Hi @rohanKanojia. Thanks for your PR.

I'm waiting for a devfile member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@rohanKanojia
Copy link
Copy Markdown
Member Author

/ok-to-test

@akurinnoy
Copy link
Copy Markdown
Collaborator

/retest

@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented May 7, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: akurinnoy, rohanKanojia
Once this PR has been reviewed and has the lgtm label, please assign dkwon17 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

@rohanKanojia rohanKanojia merged commit fe24d19 into devfile:main May 7, 2025
12 of 14 checks passed
@rohanKanojia rohanKanojia deleted the pr/fix-deprecated-method branch May 7, 2025 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants