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 Stringer panic check to look like stdlib #857

Merged
merged 1 commit into from Aug 28, 2020
Merged

Conversation

prashantv
Copy link
Collaborator

There's no behaviour changes, but there are a couple of refactorings:

  • Name the named return error retErr, and use explicit return
    values. The only purpose of the named return is for the panic
    handling.
  • Make the panic handling look more similar to the standard library
    and add a reference to the stdlib code in fmt that does the
    same checks.

This is a follow-up to #854

There's no behaviour changes, but there are a couple of refactorings:
 * Name the named return error `retErr`, and use explicit return
   values. The only purpose of the named return is for the panic
   handling.
 * Make the panic handling look more similar to the standard library
   and add a reference to the stdlib code in fmt that does the
   same checks.
@prashantv prashantv requested a review from abhinav August 28, 2020 20:44
@codecov
Copy link

codecov bot commented Aug 28, 2020

Codecov Report

Merging #857 into master will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #857      +/-   ##
==========================================
- Coverage   98.36%   98.36%   -0.01%     
==========================================
  Files          43       43              
  Lines        2382     2381       -1     
==========================================
- Hits         2343     2342       -1     
  Misses         32       32              
  Partials        7        7              
Impacted Files Coverage Δ
zapcore/field.go 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 663c590...6fc7f21. Read the comment docs.

@prashantv prashantv merged commit be2be86 into master Aug 28, 2020
@prashantv prashantv deleted the ref_stdlib branch August 28, 2020 21:11
cgxxv pushed a commit to cgxxv/zap that referenced this pull request Mar 25, 2022
There's no behaviour changes, but there are a couple of refactorings:
 * Name the named return error `retErr`, and use explicit return
   values. The only purpose of the named return is for the panic
   handling.
 * Make the panic handling look more similar to the standard library
   and add a reference to the stdlib code in fmt that does the
   same checks.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants