mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-02 11:18:16 +00:00
Ginkgo v2.18.0 allows tweaking the output so that it's easier to follow while a job runs in Prow (https://github.com/onsi/ginkgo/issues/1347). Using this in hack/ginkgo-e2e.sh will follow in a separate commit. Gomega gets bumped to the latest release to keep it up-to-date. Ginkgo v1.19.0 adds support for --label-filter with labels that represent sets (like our Feature:<Foo>).
29 lines
548 B
Go
29 lines
548 B
Go
package sprig
|
|
|
|
import (
|
|
"fmt"
|
|
"reflect"
|
|
)
|
|
|
|
// typeIs returns true if the src is the type named in target.
|
|
func typeIs(target string, src interface{}) bool {
|
|
return target == typeOf(src)
|
|
}
|
|
|
|
func typeIsLike(target string, src interface{}) bool {
|
|
t := typeOf(src)
|
|
return target == t || "*"+target == t
|
|
}
|
|
|
|
func typeOf(src interface{}) string {
|
|
return fmt.Sprintf("%T", src)
|
|
}
|
|
|
|
func kindIs(target string, src interface{}) bool {
|
|
return target == kindOf(src)
|
|
}
|
|
|
|
func kindOf(src interface{}) string {
|
|
return reflect.ValueOf(src).Kind().String()
|
|
}
|