Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JSONExactlyMatcher ¶
JSONExactlyMatcher checks that actual and expected JSON represents exactly the same data structure
func JSONMatcher ¶
JSONMatcher checks that actual JSON value deeply contains expected value In other words actual value should be superset of expected See tests for more examples
func RegexpMatcher ¶
RegexpMatcher matches actual value against regular expression
func RegisterMatcher ¶
RegisterMatcher registers new matcher with given name. Should be typically called in init() function.
Types ¶
type JSONMatcherError ¶
type JSONMatcherError struct { MatcherError // contains filtered or unexported fields }
JSONMatcherError is MatchError with mismatch path details
func (JSONMatcherError) Error ¶
func (jme JSONMatcherError) Error() string
type Matcher ¶
Matcher is function that matches two string values in some way It returns nil if arguments match or error with mismatch description otherwise
func GetMatcher ¶
GetMatcher returns registered matcher by name
type MatcherError ¶
type MatcherError struct {
// contains filtered or unexported fields
}
MatcherError is an Error instance describing mismatch
func (MatcherError) Error ¶
func (me MatcherError) Error() string