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

chore: stop using deprecated io/ioutil package #180

Merged
merged 1 commit into from
Jan 10, 2024

Conversation

marquiz
Copy link
Contributor

@marquiz marquiz commented Jan 10, 2024

Replace with corresponding functions from io and os packages.

Replace with corresponding functions from io and os packages.

Signed-off-by: Markus Lehtonen <[email protected]>
@elezar
Copy link
Contributor

elezar commented Jan 10, 2024

@marquiz as a test I ran golangci-lint over the codebase and noted:

schema/schema.go:25:2: SA1019: "io/ioutil" has been deprecated since Go 1.19: 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"
        ^
pkg/cdi/spec.go:22:2: SA1019: "io/ioutil" has been deprecated since Go 1.19: 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"
        ^
pkg/cdi/spec-dirs_test.go:21:2: SA1019: "io/ioutil" has been deprecated since Go 1.19: 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"
        ^

Does it make sense to enable this as a follow up as well?

Copy link
Contributor

@elezar elezar left a comment

Choose a reason for hiding this comment

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

Thanks @marquiz.

LGTM.

Let's consider adding golangci-lint as a follow-up.

@elezar elezar merged commit 7021321 into cncf-tags:main Jan 10, 2024
7 checks passed
@marquiz marquiz deleted the devel/ioutil branch January 10, 2024 17:12
@marquiz
Copy link
Contributor Author

marquiz commented Jan 10, 2024

Let's consider adding golangci-lint as a follow-up.

Yes, definitely will make sense

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.

3 participants