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

Remove references to io/ioutil package #790

Merged

Conversation

austinvazquez
Copy link
Contributor

io/ioutil package has been marked deprecated in Go 1.16.

https://go.dev/doc/go1.16#ioutil

Signed-off-by: Austin Vazquez macedonv@amazon.com

Signed-off-by: Austin Vazquez <macedonv@amazon.com>
@austinvazquez austinvazquez marked this pull request as ready for review December 1, 2022 22:43
@@ -11,7 +10,7 @@ import (

var _ = Describe("IpforwardLinux", func() {
It("echo1 must not write the file if content is 1", func() {
file, err := ioutil.TempFile(os.TempDir(), "containernetworking")
file, err := os.CreateTemp("", "containernetworking")
Copy link
Member

Choose a reason for hiding this comment

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

the input dir here should not be changed to "" from os.TempDir()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

os.CreateTemp will call os.TempDir under the hood if dir is empty.
https://pkg.go.dev/os#CreateTemp

Would you still prefer the revert to the explicit call here?

@squeed
Copy link
Member

squeed commented Jan 16, 2023

seems fine, not sure why tests haven't run. hold please.

@squeed squeed closed this Jan 16, 2023
@squeed squeed reopened this Jan 16, 2023
@squeed squeed merged commit 0924b71 into containernetworking:main Jan 16, 2023
@austinvazquez austinvazquez deleted the remove-ioutil-references branch January 19, 2023 18:48
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.

None yet

3 participants