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

replace ioutil with os,io #509

Merged
merged 1 commit into from
Dec 6, 2022
Merged

replace ioutil with os,io #509

merged 1 commit into from
Dec 6, 2022

Conversation

meowsbits
Copy link
Contributor

make lint complains that as of Go 1.16, ioutil is deprecated and is to be replace by os and io.

These errors look like this:

make lint                                                                                                                                                                                      
env GO111MODULE=on go run build/ci.go lint                                                                                                                                                     
build/cache/golangci-lint-1.46.2-linux-amd64.tar.gz is up-to-date                                                                                                                              
>>> build/cache/golangci-lint-1.46.2-linux-amd64/golangci-lint run --timeout 3m0s --config .golangci.yml ./...
tests/params.go:23:2: SA1019: package io/ioutil is deprecated: As of Go 1.16, the same functionality is now provided by package io or package os, and those implementations should be preferred in new code. See the specific function documentation for details. (staticcheck)                                                                                                               
        "io/ioutil"                                                                                                                                                                            
        ^                                                                                                                                                                                      
tests/difficulty_mgen_test.go:23:2: SA1019: package io/ioutil is deprecated: As of Go 1.16, the same functionality is now provided by package io or package os, and those implementations should be preferred in new code. See the specific function documentation for details. (staticcheck)
        "io/ioutil"                                                                               
        ^                                                                                                                                                                                      
tests/state_mgen_test.go:23:2: SA1019: package io/ioutil is deprecated: As of Go 1.16, the same functionality is now provided by package io or package os, and those implementations should be 
preferred in new code. See the specific function documentation for details. (staticcheck)                                                                                                      
        "io/ioutil"                                                                                                                                                                            
        ^                                                                                                                                                                                      
util.go:47: exit status 1                                                                                                                                                                      
exit status 1                                                                                                                                                                                  
Makefile:108: recipe for target 'lint' failed                                  
make: *** [lint] Error 1              

…client,integration,node,params/confp/generic,convert_test,params/confp/tconvert,params/types/parity,tests: SA1019: package io/ioutil is deprecated

As of Go 1.16, the same functionality is now provided by package io or package os, and those implementations should be preferred in new code. See the specific function documentation for details. (staticcheck)

Date: 2022-11-11 14:08:10-08:00
Signed-off-by: meows <[email protected]>
@meowsbits meowsbits requested a review from ziogaschr November 11, 2022 22:12
Copy link
Member

@ziogaschr ziogaschr left a comment

Choose a reason for hiding this comment

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

This is one is useful for upstream as well :)

@meowsbits meowsbits merged commit b909e85 into master Dec 6, 2022
@meowsbits meowsbits deleted the io-deprecated-go1.16 branch December 6, 2022 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants