-
Notifications
You must be signed in to change notification settings - Fork 375
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
feat(p/ufmt): Support more formatting verbs #2351
Conversation
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.
Looks good to me, except a minor simplification.
Co-authored-by: Marc Vertes <mvertes@free.fr>
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.
good, please merge master and fix ci.
Pinging @notJoon for visibility |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2351 +/- ##
=======================================
Coverage 60.91% 60.91%
=======================================
Files 564 564
Lines 75273 75273
=======================================
+ Hits 45851 45855 +4
+ Misses 26052 26047 -5
- Partials 3370 3371 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@zivkovicmilos fixed! |
Description
Support for several new formatting verbs to the
ufmt
package:%x
: Outputs byte values as hexadecimal strings. Supports uint8, []uint8, and [32]uint8 types.%q
: Outputs quoted strings with proper escaping. Supports string type.%T
: Outputs the type of the value. Supports various built-in types using type switching with interface{}.Particularly in the case of byte slices, previously need to use a loop to convert each element to a string one by one, but now there is no need for that anymore.