func If(t skipT, condition BoolOrCheckFunc, msgAndArgs ...interface{})
If the condition expression evaluates to true, skip the test.
The condition argument may be one of three types: bool, func() bool, or func() SkipResult. When called with a bool, the test will be skip if the condition evaluates to true. When called with a func() bool, the test will be skip if the function returns true. When called with a func() Result, the test will be skip if the Skip method of the result returns true. The skip message will contain the source code of the expression. Extra message text can be passed as a format string with args.
▹ Example
▹ Example (WithExpression)
BoolOrCheckFunc can be a bool, func() bool, or func() Result. Other types will panic
type BoolOrCheckFunc interface{}
Result of skip function
type Result interface { Skip() bool Message() string }