mirror of https://github.com/golang/go.git
cmd/vet: -composites only checks imported types
The check has worked this way for a long time, but it has never been well documented. For #25453. Change-Id: If603e53348ba51f73b2f449b943c6f97f64aa3eb Reviewed-on: https://go-review.googlesource.com/113755 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rob Pike <r@golang.org>
This commit is contained in:
parent
226651a541
commit
8a16c71067
|
|
@ -18,7 +18,7 @@ var compositeWhiteList = flag.Bool("compositewhitelist", true, "use composite wh
|
|||
|
||||
func init() {
|
||||
register("composites",
|
||||
"check that composite literals used field-keyed elements",
|
||||
"check that composite literals of types from imported packages use field-keyed elements",
|
||||
checkUnkeyedLiteral,
|
||||
compositeLit)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue