Documentation ¶
Index ¶
- func Any[T any]() func(int, T) string
- func Equal[T any](v T) func(int, T) string
- func Returning1[T any](a0 T) func() (string, func() T)
- func Returning1v[T0 any](a0 ...T0) func() (string, func() T0)
- func Returning2[T0 any, T1 any](a0 T0, a1 T1) func() (string, func() (T0, T1))
- func Returning3[T0 any, T1 any, T2 any](a0 T0, a1 T1, a2 T2) func() (string, func() (T0, T1, T2))
- func Returning4[T0 any, T1 any, T2 any, T3 any](a0 T0, a1 T1, a2 T2, a3 T3) func() (string, func() (T0, T1, T2, T3))
- func Returning5[T0 any, T1 any, T2 any, T3 any, T4 any](a0 T0, a1 T1, a2 T2, a3 T3, a4 T4) func() (string, func() (T0, T1, T2, T3, T4))
- func ReturningNothing() func() (string, func())
- func VarArgs[T any](matchers ...func(int, T) string) func(int, []T) string
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Returning1 ¶
Returning1 creates a return handler that always matches and returns one value.
func Returning1v ¶
Returning1v creates a return handler that returns one item in the sequence at a time and matches as long as their are items remaining.
func Returning2 ¶
Returning2 creates a return handler that always matches and returns two values.
func Returning3 ¶
Returning3 creates a return handler that always matches and returns three values.
func Returning4 ¶
func Returning4[T0 any, T1 any, T2 any, T3 any](a0 T0, a1 T1, a2 T2, a3 T3) func() (string, func() (T0, T1, T2, T3))
Returning4 creates a return handler that always matches and returns four values.
func Returning5 ¶
func Returning5[T0 any, T1 any, T2 any, T3 any, T4 any](a0 T0, a1 T1, a2 T2, a3 T3, a4 T4) func() (string, func() (T0, T1, T2, T3, T4))
Returning5 creates a return handler that always matches and returns five values.
func ReturningNothing ¶
func ReturningNothing() func() (string, func())
ReturningNothing creates a return handler that always matches and returns no values.
Types ¶
type Option ¶
func AppendArgs ¶
AppendArgs appends the arguments of a matched call to a slice of argument slices.
func Increment ¶
func Increment[T constraints.Integer](counter *T) Option
Increment increments the counter when an invocation matches.