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

faat(encoding/form): allow change the default encoder and decoder tag name #3328

Merged
merged 1 commit into from
Jun 1, 2024

Conversation

demoManito
Copy link
Member

@demoManito demoManito commented May 22, 2024

Description (what this PR does / why we need it):

Can modify the form default encode or decode default tag.

  • Change encoder and decoder tag name to form:
go build "-ldflags=-X github.com/go-kratos/kratos/v2/encoding/form.tagName=form"
  • In the same way, a variable overridable at link time is also provided to override the tag name used in the test suite:
go test "-ldflags=-X github.com/go-kratos/kratos/v2/encoding/form.tagNameTest=form"

Which issue(s) this PR fixes (resolves / be part of):

Other special notes for the reviewers:

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label May 22, 2024
@codecov-commenter
Copy link

codecov-commenter commented May 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.92%. Comparing base (d0d5761) to head (04ee757).
Report is 1 commits behind head on main.

Current head 04ee757 differs from pull request most recent head 3770228

Please upload reports for the commit 3770228 to get more accurate results.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3328      +/-   ##
==========================================
+ Coverage   81.83%   81.92%   +0.09%     
==========================================
  Files          92       92              
  Lines        4205     4205              
==========================================
+ Hits         3441     3445       +4     
+ Misses        582      580       -2     
+ Partials      182      180       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dosubot dosubot bot added the LGTM label May 25, 2024
@daemon365 daemon365 merged commit c0a7935 into main Jun 1, 2024
63 checks passed
@daemon365 daemon365 deleted the feat/form/tag-name branch June 1, 2024 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LGTM size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants