encoding/json: simplify dominantField #18037
Labels
FrozenDueToAge
help wanted
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
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: