encoding/json: simplify dominantField #18037
Closed
Comments
@jba I'm not sure I understand the point of this issue - are you going to send a CL with the simplification? |
Change https://golang.org/cl/107598 mentions this issue: |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
What version of Go are you using (
go version
)?1.7.3
What operating system and processor architecture are you using (
go env
)?any
Enhancement
Since byName sorts by index depth and tag presence, the dominant field is always the first. So the dominantField function can be simplified to checking for the error case: more than one field at top level, both tagged or both untagged.
See https://code-review.googlesource.com/9552.
The text was updated successfully, but these errors were encountered: