Skip to content

Replace deprecated io/ioutil with modern os/io equivalents#241

Merged
tnikolova82 merged 1 commit into
masterfrom
fix/remove-ioutil-deprecations
Mar 6, 2026
Merged

Replace deprecated io/ioutil with modern os/io equivalents#241
tnikolova82 merged 1 commit into
masterfrom
fix/remove-ioutil-deprecations

Conversation

@ramonskie
Copy link
Copy Markdown
Contributor

Summary

  • Replaces all ioutil.ReadFile, WriteFile, ReadDir, TempDir, TempFile, ReadAll, and Discard calls with their Go 1.16+ equivalents in the os and io packages
  • Removes the io/ioutil import from all affected files

Motivation

io/ioutil was deprecated in Go 1.16. All buildpacks now target Go 1.24.x, so these modern replacements are fully supported.

Related

Part of a series of identical PRs across all CF buildpacks and libbuildpack (see cloudfoundry/libbuildpack#211).

Replaces all ioutil.ReadFile, WriteFile, ReadDir, TempDir, TempFile,
ReadAll and Discard calls with their Go 1.16+ replacements in os and io
packages. Removes the io/ioutil import from all affected files.
Copy link
Copy Markdown
Contributor

@tnikolova82 tnikolova82 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@tnikolova82 tnikolova82 merged commit 4b38a93 into master Mar 6, 2026
1 check passed
@tnikolova82 tnikolova82 deleted the fix/remove-ioutil-deprecations branch March 6, 2026 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants