Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Matcher ¶
type Matcher struct {
// Matches returns true if the function matches.
Matches func(actual interface{}) bool
// Describe describes the matcher (e.g. "a value EqualTo(foo)"
Describe string
// Actual is used by then.AssertThat if the matcher
// needs to resolve the string description of the actual.
// This is usually if the actual is a complex type.
Actual string
// ReasonString is a comment on why the matcher did not match, and set by the caller not the matcher.
// Usually, this is set by the helper function, e.g. FooMatcher("foo").Reason("foo didn't foobar")
ReasonString string
}
Matcher provides the structure for matcher operations.
func (*Matcher) AppendActual ¶ added in v1.0.1
AppendActual appends an actual string to the matcher's actual description. This is useful if you want to preseve sub-matchers actual values. See is.AllOf() matcher for an example.
Click to show internal directories.
Click to hide internal directories.