Skip to content

bb, makebb: replace deprecated io/ioutil with os - #157

Merged
rminnich merged 2 commits into
u-root:mainfrom
montionugera:fix/issue-154-golangci-lint-findings
Oct 17, 2026
Merged

rminnich merged 2 commits into
u-root:mainfrom
montionugera:fix/issue-154-golangci-lint-findings

Conversation

@montionugera

Copy link
Copy Markdown
Contributor

Resolves Group 4 of #154.

Replace ioutil.TempDir with os.MkdirTemp in cmd/makebb, and replace ioutil.WriteFile with os.WriteFile in pkg/bb/bbinternal. Both files already import os.

These were the last two uses of io/ioutil in the tree, completely eliminating the deprecated package from src/.

ioutil.TempDir has been deprecated since Go 1.17; os.MkdirTemp is the
replacement. Drop the io/ioutil import as os is already imported.

Authored by Claude.

Signed-off-by: pasitnusso <[email protected]>
ioutil.WriteFile has been deprecated since Go 1.16; os.WriteFile is the
replacement. Drop the io/ioutil import as os is already imported. This
removes the last use of io/ioutil in the src/ tree.

Authored by Claude.

Signed-off-by: pasitnusso <[email protected]>
@rminnich

Copy link
Copy Markdown
Member

Thanks!

@codecov

codecov Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.12%. Comparing base (f6b7c1e) to head (85541b2).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #157   +/-   ##
=======================================
  Coverage   78.12%   78.12%           
=======================================
  Files          17       17           
  Lines        1417     1417           
=======================================
  Hits         1107     1107           
  Misses        310      310           
Flag Coverage Δ
1.26.x 78.12% <100.00%> (ø)
1.27.x 77.58% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rminnich
rminnich merged commit 04899d3 into u-root:main Oct 17, 2026
10 of 11 checks passed
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