gstruct/fields.go
func MatchFields(options Options, fields Fields) types.GomegaMatcher {
	return &FieldsMatcher{
		Fields:        fields,
		IgnoreExtras:  options&IgnoreExtras != 0,
		IgnoreMissing: options&IgnoreMissing != 0,
	}
}
func MatchFields(options Options, fields Fields) types.GomegaMatcher {
	return &FieldsMatcher{
		Fields:        fields,
		IgnoreExtras:  options&IgnoreExtras != 0,
		IgnoreMissing: options&IgnoreMissing != 0,
	}
}
//MatchFields succeeds if each element of a struct matches the field matcher associated with
//it. It can ignore extra fields and/or missing fields.
//    actual := struct{
//      A int
//      B []bool
//      C string
//    }{
//      A: 5,
//      B: []bool{true, false},
//      C: "foo",
//    }
//
//    Expect(actual).To(MatchFields(IgnoreExtras, Fields{
//      "A": Equal(5),
//      "B": ConsistOf(true, false),
//    }))
//    Expect(actual).To(MatchFields(IgnoreMissing, Fields{
//      "A": Equal(5),
//      "B": ConsistOf(true, false),
//      "C": Equal("foo"),
//      "D": Equal("extra"),
//    }))