-
Notifications
You must be signed in to change notification settings - Fork 8k
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
refactor(form_mapping.go): mapping ptr, struct and map #1749
Conversation
* fix gin-gonic#1672 correct work with ptr - not create value if field is not set * avoid allocations on strings.Split() - change to strings.Index() * fix gin-gonic#610 tag value "-" is mean ignoring field * struct fields mapped like json.Unmarshal * map fields mapped like json.Unmarshal
Codecov Report
@@ Coverage Diff @@
## master #1749 +/- ##
==========================================
+ Coverage 98.5% 98.62% +0.11%
==========================================
Files 41 41
Lines 2073 2103 +30
==========================================
+ Hits 2042 2074 +32
+ Misses 19 18 -1
+ Partials 12 11 -1
Continue to review full report at Codecov.
|
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.
LGTM, thanks!
@appleboy please review the pull request, thanks! |
details see gin-gonic/gin#1749
Run benchmark:
go test -run=NONE -benchmem -bench=BenchmarkMapForm ./binding -benchtime=20s > new.bench
Compare
benchcmp old.bench new.bench
: