rack icon indicating copy to clipboard operation
rack copied to clipboard

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

Open Juneezee opened this issue 3 years ago • 1 comments

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 (returns a slice of os.DirEntry rather than a slice of fs.FileInfo)
  • ioutil.ReadFile => os.ReadFile
  • ioutil.TempDir => os.MkdirTemp
  • ioutil.TempFile => os.CreateTemp
  • ioutil.WriteFile => os.WriteFile

Juneezee avatar Sep 16 '22 09:09 Juneezee

Thanks for the PR @Juneezee ! We'll merge as soon as we can

heronrs avatar Sep 20 '22 15:09 heronrs

Codecov Report

Base: 36.23% // Head: 36.23% // No change to project coverage :thumbsup:

Coverage data is based on head (6620b80) compared to base (1d65f60). Patch coverage: 43.33% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3582   +/-   ##
=======================================
  Coverage   36.23%   36.23%           
=======================================
  Files         168      168           
  Lines       18413    18413           
=======================================
  Hits         6672     6672           
  Misses      10608    10608           
  Partials     1133     1133           
Impacted Files Coverage Δ
pkg/api/controllers.go 62.61% <ø> (ø)
pkg/api/routes.go 100.00% <ø> (ø)
pkg/cli/auth.go 12.19% <0.00%> (ø)
pkg/cli/env.go 57.60% <0.00%> (ø)
pkg/cli/update.go 18.51% <0.00%> (ø)
pkg/generate/method.go 32.43% <0.00%> (ø)
pkg/helpers/aws.go 37.08% <0.00%> (ø)
pkg/helpers/file.go 0.00% <0.00%> (ø)
pkg/helpers/linux.go 0.00% <0.00%> (ø)
pkg/helpers/tar.go 0.00% <0.00%> (ø)
... and 24 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar Sep 28 '22 01:09 codecov[bot]