-
Notifications
You must be signed in to change notification settings - Fork 303
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
Split GetPortsAndProtocol function to 4 separate functions #1764
Split GetPortsAndProtocol function to 4 separate functions #1764
Conversation
/assign cezarygerard |
/assign bowei |
small comments, otherwise LGTM |
I also think I should add Unit tests here, cause these functions were not covered |
ce607ef
to
991df17
Compare
991df17
to
eff3a02
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just readability concerns
again ;-)
} | ||
} | ||
|
||
func TestGetPorts(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this does not need to be a table test
but I can live with it ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there is some value in checking it for "edge" condition (empty slice) and with some real value
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, I did not notice that the test actually has more than 1 condition.
Return values are independent, and there is no reason to do it in single function
eff3a02
to
25758ef
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cezarygerard, panslava The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Return values are independent, and there is no reason to do it in single function