Skip to content

Tracking Deprecated io/ioutil Package Usage #52

@sebrandon1

Description

@sebrandon1

Deprecated io/ioutil Usage Report

Last Updated: 2025-12-01 17:18:09 UTC
Replacement: Use io and os packages
Reference: Go 1.16 Release Notes

Summary

  • Total Repositories Scanned: 546
  • Repositories Skipped (forks): 0
  • Repositories Skipped (abandoned - no commits in 6 months): 208
  • Repositories Skipped (non-Go): 10
  • Repositories Actually Checked: 328
  • Repositories Using Deprecated io/ioutil: 44
  • Usage Percentage: 13.4%

openshift

Repositories Using Deprecated io/ioutil: 41

Repository Branch Last Updated PR Status Needs Rebase?
oc main 2025-12-01
microshift main 2025-12-01
oauth-server master 2025-12-01 🔄 #202 ⚠️ Yes
ci-tools main 2025-12-01 🔄 #4852 ✅ No
origin main 2025-12-01
zero-trust-workload-identity-manager main 2025-12-01
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
machine-config-operator main 2025-11-27 🔄 #5438 ✅ No
sriov-network-operator main 2025-11-27
hive 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-etcd-operator main 2025-11-26
machine-api-provider-aws main 2025-11-25
router master 2025-11-25 🔄 #693 ✅ No
openshift-apiserver main 2025-11-25
multus-networkpolicy main 2025-11-24 🔄 #80 ✅ No
cluster-config-operator main 2025-11-24 🔄 #454 ✅ No
oc-mirror main 2025-11-21
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
cluster-api-provider-ibmcloud main 2025-11-21
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
cluster-api-provider-libvirt main 2025-11-10 🔄 #295 ✅ No
oauth-apiserver master 2025-11-10 🔄 #156 ✅ No
builder main 2025-11-10 🔄 #490 ✅ 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
imagebuilder master 2025-10-16
cluster-openshift-apiserver-operator main 2025-10-06
azure-service-operator main 2025-10-01
content-mirror main 2025-08-18 🔄 #14 ✅ No
ci-search master 2025-07-30 🔄 #140 ✅ No

openshift-kni

Repositories Using Deprecated io/ioutil: 3

Repository Branch Last Updated PR Status Needs Rebase?
lifecycle-agent main 2025-12-01
debug-tools main 2025-11-20 🔄 #102 ✅ No
ptp-events-consumer main 2025-11-11 🔄 #6 ✅ 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