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 linter warning message #1057

Merged
merged 1 commit into from
Apr 6, 2023

Conversation

s1061123
Copy link
Member

@s1061123 s1061123 commented Apr 3, 2023

Fix linter/revive warning message.

@coveralls
Copy link

coveralls commented Apr 3, 2023

Coverage Status

Coverage: 68.633% (-0.2%) from 68.8% when pulling f3af119 on s1061123:fix/liner-warning into 6c2e095 on k8snetworkplumbingwg:master.

Copy link
Collaborator

@maiqueb maiqueb left a comment

Choose a reason for hiding this comment

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

Thank you!

if err := os.Setenv("CNI_ARGS", cniArgs); err != nil {
return err
}
return nil
return os.Setenv("CNI_ARGS", cniArgs)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is CNI_ARGS going to be the new default instead of returning nil? And what is the reason for this change?

Comment on lines -240 to +237
if err := os.Unsetenv("CNI_ARGS"); err != nil {
return err
}
return nil
return os.Unsetenv("CNI_ARGS")
Copy link
Collaborator

Choose a reason for hiding this comment

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

ditto

func (fe *fakeExec) FindInPath(plugin string, paths []string) (string, error) {
func (fe *fakeExec) FindInPath(_ string, _ []string) (string, error) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why have argument names been removed for many functions? What is the need for this?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Make peace with the linter ? It is complaining these attributes are not being used.

Thus we tell the compiler we don't care enough to name them.

... this needs to happen because this is a method of an interface.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks Miguel, also talked to Tomo about the changes. I think we're good to merge here

Copy link
Collaborator

@nicklesimba nicklesimba left a comment

Choose a reason for hiding this comment

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

Changes looks good to me, and thanks Tomo/Miguel for explaining the need for these changes.

@s1061123 s1061123 merged commit 5bce250 into k8snetworkplumbingwg:master Apr 6, 2023
@s1061123 s1061123 deleted the fix/liner-warning branch April 6, 2023 15:20
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

4 participants