Closed zak905 closed 8 months ago
This issue has been automatically marked as stale because it hasn't seen a recent update. It'll be automatically closed in a few days.
Hello Gorilla Maintainers,
@kisielk @elithrar @moraes @zeebo
any chance getting this reviewed or at least getting a feedback ? I am already using this directly from my own fork, works great so far
I took a quick glance over this, nothing stands out to me. @zak905 I know it's been awhile, are you willing to update the PR with the latest base branch?
@jaitaiwan done. thanks for looking into it. I am glad to see the project active again
Attention: 4 lines
in your changes are missing coverage. Please review.
Comparison is base (
4890efc
) 83.23% compared to head (7807359
) 86.59%.
Files | Patch % | Lines |
---|---|---|
decoder.go | 92.45% | 3 Missing and 1 partial :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Thanks so much for the contribution @zak905 - I hate to ask any more of you when this has already been in progress for so long, but is there any chance the tests could be updated to meet our coverage standards? I'll make a special note to watch out for this PR to get it in asap.
Sure thing, I will look into it asap. Thanks.
@AlexVulaj thanks again for looking into this. I have added more testing to cover the unreached code, it should be ok now hopefully
@jaitaiwan I'm good with this, wanna give it a quick last glance and merge?
All finished @zak905 , appreciate the contribution.
Welcome. Thanks @AlexVulaj and @jaitaiwan. I have to admit that I thought that this will never get merged, especially after the Gorilla project got archived :) so I would say this a great twist. Hopefully this will make setting default values trivial - I am hoping to see also some similar functionality in the standard golang json package someday.
By the way, do you think it's worth adding a README section about the default
tag option ?
Definitely, if you’re happy to make a contribution we’ll endeavour to look asap.
thanks. Read me updated at: https://github.com/gorilla/schema/pull/209
@jaitaiwan is it possible to create a release for this changeset (and other changes that occured since v1.2.1) ?
Definitely possible @zak905
awesome thanks
Summary of Changes
this is the implementation for the functionality described in #182
default
tag to allow setting values when decoding in case no value is provideddefault
tag scope to only primitive types and their pointers as well