Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: move from io/ioutil to io and os packages #1417

Merged
merged 2 commits into from
Oct 29, 2022
Merged

refactor: move from io/ioutil to io and os packages #1417

merged 2 commits into from
Oct 29, 2022

Conversation

Juneezee
Copy link
Contributor

The io/ioutil package has been deprecated in Go 1.16 (See https://pkg.go.dev/io/ioutil). This PR replaces the existing io/ioutil functions with their new definitions in io and os packages.

  • ioutil.Discard => io.Discard
  • ioutil.NopCloser => io.NopCloser
  • ioutil.ReadAll => io.ReadAll
  • ioutil.ReadDir => os.ReadDir
  • ioutil.TempDir => os.MkdirTemp
  • ioutil.TempFile => os.CreateTemp
  • ioutil.WriteFile => os.WriteFile

The io/ioutil package has been deprecated as of Go 1.16 [1]. This commit
replaces the existing io/ioutil functions with their new definitions in
io and os packages.

[1]: https://golang.org/doc/go1.16#ioutil
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
@Juneezee Juneezee requested a review from a team as a code owner October 29, 2022 09:30
Copy link
Member

@KnisterPeter KnisterPeter left a comment

Choose a reason for hiding this comment

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

Looks good. Thank you

@codecov
Copy link

codecov bot commented Oct 29, 2022

Codecov Report

Merging #1417 (879adff) into master (4f8da0a) will increase coverage by 6.41%.
The diff coverage is 74.72%.

@@            Coverage Diff             @@
##           master    #1417      +/-   ##
==========================================
+ Coverage   57.50%   63.92%   +6.41%     
==========================================
  Files          32       41       +9     
  Lines        4594     6450    +1856     
==========================================
+ Hits         2642     4123    +1481     
- Misses       1729     2032     +303     
- Partials      223      295      +72     
Impacted Files Coverage Δ
pkg/common/file.go 0.00% <0.00%> (ø)
pkg/model/action.go 0.00% <0.00%> (ø)
pkg/model/step_result.go 0.00% <ø> (ø)
pkg/container/docker_run.go 12.82% <11.58%> (+7.27%) ⬆️
pkg/model/workflow.go 47.14% <22.22%> (-3.77%) ⬇️
pkg/container/docker_pull.go 33.33% <33.33%> (ø)
pkg/container/file_collector.go 45.87% <45.87%> (ø)
pkg/common/git/git.go 50.00% <49.01%> (ø)
pkg/container/docker_auth.go 47.61% <50.00%> (+2.61%) ⬆️
pkg/model/planner.go 48.82% <50.00%> (-1.60%) ⬇️
... and 32 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@mergify mergify bot merged commit 2f1c5a1 into nektos:master Oct 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants