-
Notifications
You must be signed in to change notification settings - Fork 447
Fix: Make the case []interface{} processed consist with the case primitve.A #1135
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
base: main
Are you sure you want to change the base?
Conversation
…ive.A, just like the upper case bson.M and case map[string]interface{} have the same process Signed-off-by: LinPr <[email protected]>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1135 +/- ##
==========================================
- Coverage 70.88% 65.10% -5.79%
==========================================
Files 28 29 +1
Lines 3569 3092 -477
==========================================
- Hits 2530 2013 -517
- Misses 904 939 +35
- Partials 135 140 +5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@@ -329,7 +329,7 @@ func makeMetrics(prefix string, m bson.M, labels map[string]string, compatibleMo | |||
case primitive.A: | |||
res = append(res, processSlice(nextPrefix, v, l, compatibleMode)...) | |||
case []interface{}: | |||
continue | |||
res = append(res, processSlice(nextPrefix, v, l, compatibleMode)...) |
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.
I think we can simplify this and merge this case with primitive.A
case primitive.A, []interface{}: res = append(res, processSlice(nextPrefix, v, l, compatibleMode)...)
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.
make the case []interface{} processed consist with the case primitve.A, just like the upper case bson.M and case map[string]interface{} have the same handle function.