golangci-lint/test/testdata/exhaustivestruct.go
Mateusz Bilski c57627b18c
Add exhaustivestruct linter (#1411)
* Add exhaustivestruct linter

* CHange load mode to types info

* Fix go.mod
2020-10-12 08:35:02 +02:00

17 lines
180 B
Go

//args: -Eexhaustivestruct
package testdata
type Test struct {
A string
B int
}
var pass = Test{
A: "a",
B: 0,
}
var fail = Test{ // ERROR "B is missing in Test"
A: "a",
}