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

Update LabelValue obtain pod information function to add default value parameter #98

Merged
merged 2 commits into from
Aug 23, 2023

Conversation

mrproliu
Copy link
Contributor

No description provided.

@mrproliu mrproliu added the enhancement New feature or request label Aug 23, 2023
@mrproliu mrproliu added this to the 0.6.0 milestone Aug 23, 2023
@mrproliu mrproliu requested a review from wu-sheng August 23, 2023 04:18
@wu-sheng
Copy link
Member

So, this means, select the first value of given keys, if all are null, fall into default value?

@mrproliu
Copy link
Contributor Author

Yes.

@wu-sheng
Copy link
Member

I would suggest rename this to valueOfFirstNotNullLabel. default value is fine as a parameter.

@mrproliu
Copy link
Contributor Author

We already have the LabelValue function as you said(valueOfFirstNotNullLabel), but there is no default value parameter, should I just add the default value parameter in the LabelValue?

@wu-sheng
Copy link
Member

We don't support overload?

@mrproliu
Copy link
Contributor Author

Yes, I use a structure to implement the functions, and overload is not supported in the Golang structure.

@wu-sheng
Copy link
Member

Then it is better to change the old function through add a new parameter.

@mrproliu mrproliu changed the title Adding LabelValueWithDefault function to obtain information from pod Update LabelValue obtain pod information function to add default value parameter Aug 23, 2023
@wu-sheng wu-sheng merged commit 1201363 into apache:main Aug 23, 2023
28 checks passed
@mrproliu mrproliu deleted the label-value-with-default branch August 23, 2023 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants