You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: skip.go
    path of file: ./repos/moby/vendor/gotest.tools/v3/skip
    
    the code of the file until where you have to start completion: /*
Package skip provides functions for skipping a test and printing the source code
of the condition used to skip the test.
*/
package skip // import "gotest.tools/v3/skip"

import (
	"fmt"
	"path"
	"reflect"

    
func If(t skipT, condition BoolOrCheckFunc, msgAndArgs ...interface{}) {
	if ht, ok := t.(helperT); ok {
		ht.Helper()
	}
	switch check := condition.(type) {
	case bool:
		ifCondition(t, check, msgAndArgs...)
	case func() bool:
		if check() {
			t.Skip(format.WithCustomMessage(getFunctionName(check), msgAndArgs...))
		}
	case func() Result:
		result := check()
		if result.Skip() {
			msg := getFunctionName(check) + ": " + result.Message()
			t.Skip(format.WithCustomMessage(msg, msgAndArgs...))
		}
	default:
		panic(fmt.Sprintf("invalid type for condition arg: %T", check))
	}
}