Documentation ¶
Index ¶
- func ExpectStructsToMatch(expected interface{}, actual interface{})deprecated
- func ExpectStructsToMatchExcluding(expected interface{}, actual interface{}, excludeFields ...string)deprecated
- func ExpectStructsToMatchIncluding(expected interface{}, actual interface{}, includeFields ...string)deprecated
- func StructMatcher(expected, actual interface{}, shouldFilter bool, filterInclude bool, ...) []string
- type Matcher
- func (m *Matcher) ExcludingFields(fields ...string) *Matcher
- func (m *Matcher) FailureMessage(actual interface{}) (message string)
- func (m *Matcher) IncludingFields(fields ...string) *Matcher
- func (m *Matcher) Match(actual interface{}) (success bool, err error)
- func (m *Matcher) NegatedFailureMessage(actual interface{}) (message string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExpectStructsToMatch
deprecated
func ExpectStructsToMatch(expected interface{}, actual interface{})
Deprecated: Use structmatcher.MatchStruct() GomegaMatcher
func ExpectStructsToMatchExcluding
deprecated
func ExpectStructsToMatchExcluding(expected interface{}, actual interface{}, excludeFields ...string)
Deprecated: Use structmatcher.MatchStruct().ExcludingFields() GomegaMatcher
func ExpectStructsToMatchIncluding
deprecated
func ExpectStructsToMatchIncluding(expected interface{}, actual interface{}, includeFields ...string)
Deprecated: Use structmatcher.MatchStruct().IncludingFields() GomegaMatcher
func StructMatcher ¶
func StructMatcher(expected, actual interface{}, shouldFilter bool, filterInclude bool, filterFields ...string) []string
* If fields are to be filtered in or out, set shouldFilter to true; filterInclude is true to * include fields or false to exclude fields, and filterFields contains the field names to filter on. * To filter on a field "fieldname" in struct "structname", pass in "fieldname". * To filter on a field "fieldname" in a nested struct under field "structfield", pass in "structfield.fieldname". * This function assumes structs will only ever be nested one level deep.
Types ¶
type Matcher ¶
type Matcher struct {
// contains filtered or unexported fields
}
func MatchStruct ¶
func MatchStruct(expected interface{}) *Matcher