-
Notifications
You must be signed in to change notification settings - Fork 2
Fix/1078 rendering time diff #27
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
Conversation
Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
This is inspired by stretchr#1829, but we proceed differently, not checking for a string type but for type convertibility to a time instead. Added more tests to check how embedded types, pointers etc actually render and don't cause panic. From the original issues: * fixes stretchr#1078 * fixes stretchr#1079 Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #27 +/- ##
==========================================
- Coverage 88.29% 88.21% -0.08%
==========================================
Files 59 60 +1
Lines 7389 7467 +78
==========================================
+ Hits 6524 6587 +63
- Misses 725 735 +10
- Partials 140 145 +5 ☔ View full report in Codecov by Sentry. |
ccoVeille
left a comment
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.
Apparently you already merged
| } | ||
|
|
||
| // stringizeWants converts a slice of wanted test output into a format suitable | ||
| // stringizeWants verts a slice of wanted test output into a format suitable |
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 change looks weird
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. Typo. Will do. Thank
| } | ||
|
|
||
| defer catchPanic(w, v) | ||
| handled, continued := handleErrorOrStringer(cs, w, v) |
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 feel like the first commit 9dae2c7 and this could be in a separate PR. I think you are fixing things that aren't related to time.Time
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 stems from various issues I've faced while testing. My initial scope for testing was larger and uncovered issues with the "unsafe" transform. I agree that these should be address separately.
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 am currently researching a more systematic way to uncover robustness issues in spew. There are ways too
many ways to panic or hang it at this moment.
Change type
Please select: 🆕 New feature or enhancement|🔧 Bug fix'|📃 Documentation update
Short description
Fixes
Full description
Checklist