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

Propagate JSON unmarshal errors #8

Merged
merged 4 commits into from
Apr 11, 2018
Merged

Propagate JSON unmarshal errors #8

merged 4 commits into from
Apr 11, 2018

Conversation

creasty
Copy link
Owner

@creasty creasty commented Apr 11, 2018

Why

To fix #7

@codecov-io
Copy link

codecov-io commented Apr 11, 2018

Codecov Report

Merging #8 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master     #8   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           2      2           
  Lines         105    111    +6     
=====================================
+ Hits          105    111    +6
Impacted Files Coverage Δ
defaults.go 100% <100%> (ø) ⬆️

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 046b42c...b518268. Read the comment docs.

@@ -141,13 +150,17 @@ func setField(field reflect.Value, defaultVal string) {
case reflect.Ptr:
setField(field.Elem(), defaultVal)
callSetter(field.Interface())
default:
case reflect.Struct:
Copy link
Owner Author

Choose a reason for hiding this comment

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

Actually, this was a bug. Luckily I've found it by the changes.

@creasty creasty merged commit a7e48e2 into master Apr 11, 2018
@creasty creasty deleted the json_error branch April 11, 2018 12:00
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.

no errors if default value doesn't parse
2 participants