Documentation
¶
Overview ¶
Package gomock provides supplemental gomock types and helpers.
Index ¶
- func Match[T any](check func(T) bool) gomock.Matcher
- func MatchMapContains[K comparable, V comparable](want map[K]V) gomock.Matcher
- func MatchMapContainsKeys[K comparable, V any](want ...K) gomock.Matcher
- func MatchPrefix(want string) gomock.Matcher
- func MatchSliceContains[T comparable](want ...T) gomock.Matcher
- func MatchSubstring(want string) gomock.Matcher
- func MatchSuffix(want string) gomock.Matcher
- type MatchFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MatchMapContains ¶
func MatchMapContains[K comparable, V comparable]( want map[K]V, ) gomock.Matcher
MatchMapContains returns a gomock.Matcher that asserts that a given parameter is map[K]V and contains the given key/value pairs.
func MatchMapContainsKeys ¶
func MatchMapContainsKeys[K comparable, V any](want ...K) gomock.Matcher
MatchMapContainsKeys returns a gomock.Matcher that asserts that a given parameter is map[K]V and contains the given keys.
func MatchPrefix ¶
MatchPrefix returns a gomock.Matcher that asserts that a given parameter is a string and contains the given prefix.
func MatchSliceContains ¶
func MatchSliceContains[T comparable](want ...T) gomock.Matcher
MatchSliceContains returns a gomock.Matcher that asserts that a given parameter is []T and contains the given values.
func MatchSubstring ¶
MatchSubstring returns a gomock.Matcher that asserts that a given parameter is a string and contains the given substring.
func MatchSuffix ¶
MatchSuffix returns a gomock.Matcher that asserts that a given parameter is a string and contains the given suffix.
Types ¶
type MatchFunc ¶
MatchFunc is a gomock.Matcher that evaluates itself against a parameter.