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

change all ioutil calls to os #904

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

DAT4
Copy link

@DAT4 DAT4 commented Aug 14, 2023

This pull request removes all calls and imports of ioutils which is deprecated.

Only ReadFile and WriteFile of ioutil is used and those are just imported from os instead.

This is my first pull request on this branch, I don't know if you have some rules about how it should be done, please let me know if I need to do anything :-)

@DAT4
Copy link
Author

DAT4 commented Aug 14, 2023

Oh I just realized the autoformatting kicked in and added linebreaks on longer function calls. Let me know if this is a problem, then I will go back and change it.

Comment on lines +80 to +84
t.Errorf(
"expected MAC for first entry to be %s, got %s",
expectedMAC.String(),
ent.MAC.String(),
)
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not a maintainer on this repo, but I'd prefer the changes to be reverted; keeping these lines as a single line makes it easier to "skimp" over them when reading the code ("we're returning an error"); breaking it up over multiple lines doesn't really improve readability, and introduces code-churn, which we should avoid.

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