partialfields is a program for the Go language that checks that the fields of structural literals are partially defined.
🙅♀️ Don't use this.
Use exhaustivestruct
partialfields [-flag] [package]
Just give the package path.
partialfields github.com/kamiaka/partialfields/testdata/src/aSkip if the struct literal comment starts with // partial.
type Value struct {
Foo, Bar int
}
// skip check.
var OK = Value{ // partial
Foo: 1,
}
// requires Bar.
var NG = Value{
Foo: 1,
}