Skip to content

Tracking Deprecated io/ioutil Package Usage #52

@sebrandon1

Description

@sebrandon1

Deprecated io/ioutil Usage Report

Last Updated: 2025-12-02 08:01:42 UTC
Replacement: Use io and os packages
Reference: Go 1.16 Release Notes

Summary

  • Total Repositories Scanned: 536
  • Repositories Skipped (forks): 0
  • Repositories Skipped (abandoned - no commits in 6 months): 200
  • Repositories Skipped (non-Go): 7
  • Repositories Actually Checked: 329
  • Repositories Using Deprecated io/ioutil: 41
  • Usage Percentage: 12.5%

openshift

Repositories Using Deprecated io/ioutil: 38

Repository Branch Last Updated PR Status Needs Rebase?
zero-trust-workload-identity-manager main 2025-12-02
ci-tools main 2025-12-02 🔄 #4852 ✅ No
origin main 2025-12-01
oauth-server master 2025-12-01 🔄 #202 ⚠️ Yes
microshift main 2025-12-01
oc-mirror main 2025-12-01
oc main 2025-12-01
rosa master 2025-12-01
cert-manager-operator master 2025-12-01 #354 ✅ No
cluster-baremetal-operator main 2025-11-30
cluster-openshift-controller-manager-operator master 2025-11-28 🔄 #401 ✅ No
operator-framework-operator-controller main 2025-11-28
cluster-kube-apiserver-operator main 2025-11-28 🔄 #1971 ✅ No
cluster-authentication-operator master 2025-11-27
api master 2025-11-27 🔄 #2603 ✅ No
baremetal-runtimecfg main 2025-11-26 🔄 #373 ⚠️ Yes
ptp-operator main 2025-11-26 🔄 #642 ✅ No
cluster-kube-scheduler-operator main 2025-11-26
cluster-samples-operator main 2025-11-26 🔄 #668 ✅ No
service-ca-operator main 2025-11-25 🔄 #292 ✅ No
console-operator main 2025-11-24 🔄 #1072 ✅ No
cluster-ingress-operator master 2025-11-22
cluster-dns-operator master 2025-11-21 🔄 #454 ✅ No
cluster-api-actuator-pkg master 2025-11-21
oadp-operator oadp-dev 2025-11-21 🔄 #2036 ✅ No
file-integrity-operator master 2025-11-20 🔄 #803 ✅ No
machine-api-provider-azure main 2025-11-17
cluster-machine-approver main 2025-11-12 🔄 #284 ✅ No
apiserver-library-go master 2025-11-05 🔄 #156 ✅ No
ocp-release-operator-sdk main 2025-10-20
openshift-controller-manager master 2025-10-20 🔄 #422 ✅ No
cluster-bootstrap main 2025-10-17 🔄 #123 ✅ No
multus-admission-controller main 2025-10-17
generic-admission-server master 2025-10-17 🔄 #57 ✅ No
csi-driver-manila-operator master 2025-10-07
cluster-openshift-apiserver-operator main 2025-10-06
azure-service-operator main 2025-10-01
content-mirror main 2025-08-18 🔄 #14 ✅ No

openshift-kni

Repositories Using Deprecated io/ioutil: 3

Repository Branch Last Updated PR Status Needs Rebase?
cluster-group-upgrades-operator main 2025-12-01
lifecycle-agent main 2025-12-01
debug-tools main 2025-11-20 🔄 #102 ✅ No

What to Do

The io/ioutil package was deprecated in Go 1.16 (February 2021) and its functionality has been moved to the io and os packages.

Migration Guide

The following table shows the replacements for deprecated io/ioutil functions:

Deprecated (io/ioutil) Replacement Package
ioutil.Discard io.Discard io
ioutil.NopCloser io.NopCloser io
ioutil.ReadAll io.ReadAll io
ioutil.ReadDir os.ReadDir os
ioutil.ReadFile os.ReadFile os
ioutil.TempDir os.MkdirTemp os
ioutil.TempFile os.CreateTemp os
ioutil.WriteFile os.WriteFile os

Migration Steps

  1. Update import statements:

    // Remove this:
    import "io/ioutil"
    
    // Add these as needed:
    import "io"
    import "os"
  2. Replace function calls:

    // Example: ReadFile
    data, err := ioutil.ReadFile("file.txt")  // Old
    data, err := os.ReadFile("file.txt")     // New
  3. Run tests:

    go test ./...

Resources


This issue is automatically updated by the ioutil-deprecation-checker.sh script.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions