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

Add utility for common validation patterns for Numbers #2797

Merged
merged 2 commits into from
Jan 12, 2024

Conversation

idelpivnitskiy
Copy link
Member

Motivation:

We have an agreed pattern for validating numbers, but we repeat the same code in all places instead of having a single utility to handle those.

Modifications:

  • Add NumberUtils to servicetalk-utils-internal;
  • Use this utility for all number validation use-cases;

Result:

Less code duplication, consistent validation.

Motivation:

We have an agreed pattern for validating numbers, but we repeat the same
code in all places instead of having a single utility to handle those.

Modifications:
- Add `NumberUtils` to `servicetalk-utils-internal`;
- Use this utility for all number validation use-cases;

Result:

Less code duplication, consistent validation.
Copy link
Contributor

@bryce-anderson bryce-anderson left a comment

Choose a reason for hiding this comment

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

Very nice. Two small typos but looks good other than that.

@idelpivnitskiy idelpivnitskiy merged commit 43f2b4f into apple:main Jan 12, 2024
15 checks passed
@idelpivnitskiy idelpivnitskiy deleted the NumberUtils branch January 12, 2024 01:56
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