-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
fix(encoding/form): optimize EncodeField and add test cases #3234
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #3234 +/- ##
==========================================
+ Coverage 81.54% 81.63% +0.08%
==========================================
Files 91 91
Lines 4167 4165 -2
==========================================
+ Hits 3398 3400 +2
+ Misses 589 587 -2
+ Partials 180 178 -2 ☔ View full report in Codecov by Sentry. |
case protoreflect.BytesKind: | ||
return base64.URLEncoding.EncodeToString(value.Bytes()), nil | ||
case protoreflect.MessageKind, protoreflect.GroupKind: | ||
return encodeMessage(fieldDescriptor.Message(), value) | ||
default: | ||
return fmt.Sprint(value.Interface()), nil | ||
return value.String(), nil |
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.
Should this be a feature or fix?
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.
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.
What I'm talking about is the title issue
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.
done @shenqidebaozi
117f608
to
cf064eb
Compare
EncodeField
remove protoreflect.StringKind
and supplementary encode map test cases
EncodeField
remove protoreflect.StringKind
and supplementary encode map test casesEncodeField
remove protoreflect.StringKind
and add encode map test cases
EncodeField
remove protoreflect.StringKind
and add encode map test casesEncodeField
remove protoreflect.StringKind
and add map test cases
cf064eb
to
9d25284
Compare
EncodeField
remove protoreflect.StringKind
and add map test cases
Description (what this PR does / why we need it):
remove protoreflect.StringKind convert to string
supplementary encode map test cases
Which issue(s) this PR fixes (resolves / be part of):
Other special notes for the reviewers: