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

chore: truncate long CacheGetResponse.Hit string representations #324

Merged
merged 5 commits into from
Nov 14, 2022

Conversation

malandis
Copy link
Contributor

@malandis malandis commented Nov 14, 2022

This adds extension methods to both pretty print byte arrays and truncate strings. With these extension methods we trim the string representation of CacheGetResponse.Hit.

Closes #314

Adds a string extension method to truncate. Allows a configurable
total length and fill value.
This adds `ValueByteArray` to the `ToString` method of
`CacheGetResponse.Hit`, applies pretty printing and truncation.
@malandis malandis marked this pull request as ready for review November 14, 2022 20:23
cprice404
cprice404 previously approved these changes Nov 14, 2022
Copy link
Contributor

@cprice404 cprice404 left a comment

Choose a reason for hiding this comment

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

measure

Copy link
Contributor

@pgautier404 pgautier404 left a comment

Choose a reason for hiding this comment

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

LGTM!

@malandis malandis merged commit 7a35c4e into main Nov 14, 2022
@malandis malandis deleted the chore/truncate-string-representations branch November 14, 2022 20:58
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.

Revisit ToString implementation for response classes
3 participants