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

fix: replace deprecated package io/ioutil with os or io #521

Merged
merged 1 commit into from
Dec 6, 2022

Conversation

ulbqb
Copy link
Member

@ulbqb ulbqb commented Dec 6, 2022

Description

Replace deprecated io/ioutil package since Go 1.16.

  • ioutil.TempDir -> os.MkdirTemp
  • ioutil.WriteFile -> os.WriteFile
  • ioutil.ReadAll -> io.ReadAll
  • ioutil.ReadFile -> os.ReadFile

@ulbqb ulbqb marked this pull request as ready for review December 6, 2022 04:23
@ulbqb ulbqb requested review from Kynea0b, torao and tnasu as code owners December 6, 2022 04:23
@ulbqb ulbqb requested a review from Mdaiki0730 December 6, 2022 04:23
@ulbqb ulbqb self-assigned this Dec 6, 2022
@codecov
Copy link

codecov bot commented Dec 6, 2022

Codecov Report

Merging #521 (7cd4349) into main (160e52f) will increase coverage by 0.07%.
The diff coverage is 71.42%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #521      +/-   ##
==========================================
+ Coverage   65.81%   65.88%   +0.07%     
==========================================
  Files         279      279              
  Lines       38057    38057              
==========================================
+ Hits        25047    25075      +28     
+ Misses      11209    11184      -25     
+ Partials     1801     1798       -3     
Impacted Files Coverage Δ
libs/os/os.go 28.78% <0.00%> (ø)
rpc/jsonrpc/client/http_json_client.go 20.47% <0.00%> (ø)
rpc/jsonrpc/client/http_uri_client.go 0.00% <0.00%> (ø)
abci/example/kvstore/helpers.go 100.00% <100.00%> (ø)
config/toml.go 74.19% <100.00%> (ø)
consensus/state.go 73.99% <100.00%> (+0.75%) ⬆️
crypto/armor/armor.go 47.82% <100.00%> (ø)
libs/cli/helper.go 61.44% <100.00%> (ø)
p2p/key.go 67.24% <100.00%> (ø)
privval/file.go 74.90% <100.00%> (ø)
... and 18 more

@ulbqb ulbqb changed the title fix: replace deprecated package io/ioutil with os fix: replace deprecated package io/ioutil with os or 'io' Dec 6, 2022
@ulbqb ulbqb changed the title fix: replace deprecated package io/ioutil with os or 'io' fix: replace deprecated package io/ioutil with os or io Dec 6, 2022
Copy link
Member

@tnasu tnasu left a comment

Choose a reason for hiding this comment

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

Thanks for your changes. I left the upstream PR. It's a far future work for us.

p2p/key.go Show resolved Hide resolved
privval/file.go Show resolved Hide resolved
privval/file.go Show resolved Hide resolved
state/state.go Show resolved Hide resolved
statesync/chunks.go Show resolved Hide resolved
types/genesis.go Show resolved Hide resolved
@ulbqb ulbqb merged commit a990fab into Finschia:main Dec 6, 2022
@ulbqb ulbqb deleted the fix/ioutil branch December 6, 2022 06:24
@Kynea0b Kynea0b added the C: enhancement Classification: New feature or its request, or improvement in maintainability of code label Dec 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: enhancement Classification: New feature or its request, or improvement in maintainability of code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants