Skip to content

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.

@demoManito demoManito force-pushed the feat/form/tag-name branch from ae7027b to fb17998 Compare May 22, 2024 06:50
@demoManito demoManito force-pushed the feat/form/tag-name branch from 615b901 to 3770228 Compare May 22, 2024 08:50
@dosubot dosubot bot added the LGTM label May 25, 2024
@daemon365 daemon365 merged commit c0a7935 into main Jun 1, 2024
@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.

6 participants