aboutsummaryrefslogtreecommitdiff
path: root/src/text/template/exec_test.go
diff options
context:
space:
mode:
authorDaniel Martí <mvdan@mvdan.cc>2018-06-01 12:17:41 +0100
committerDaniel Martí <mvdan@mvdan.cc>2018-08-23 19:22:43 +0000
commit4b439e41e2cdd78e0eeed05942c93364c5d99b6b (patch)
tree8c90d96b638d5a8bf654b4c2fcf03b1d8da92715 /src/text/template/exec_test.go
parente897d43c37c353a35f211384058475a5093f1adf (diff)
downloadgo-4b439e41e2cdd78e0eeed05942c93364c5d99b6b.tar.xz
cmd/vet: check embedded field tags too
We can no longer use the field's position for the duplicate field tag warning - since we now check embedded tags, the positions may belong to copmletely different packages. Instead, keep track of the lowest field that's still part of the top-level struct type that we are checking. Finally, be careful to not repeat the independent struct field warnings when checking fields again because they are embedded into another struct. To do this, separate the duplicate tag value logic into a func that recurses into embedded fields on a per-encoding basis. Fixes #25593. Change-Id: I3bd6e01306d8ec63c0314d25e3136d5e067a9517 Reviewed-on: https://go-review.googlesource.com/115677 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Alan Donovan <adonovan@google.com>
Diffstat (limited to 'src/text/template/exec_test.go')
0 files changed, 0 insertions, 0 deletions