Remove runtime.Typer, reduce to ObjectKinds(1) (3)
Remove the unnecessary variants, which avoids allocations in several core paths.
This commit is contained in:
@@ -354,10 +354,11 @@ func TestUnversionedTypes(t *testing.T) {
|
||||
t.Fatalf("type not unversioned and in scheme: %t %t", unv, ok)
|
||||
}
|
||||
|
||||
kind, err := scheme.ObjectKind(&InternalSimple{})
|
||||
kinds, _, err := scheme.ObjectKinds(&InternalSimple{})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
kind := kinds[0]
|
||||
if kind != externalGV.WithKind("InternalSimple") {
|
||||
t.Fatalf("unexpected: %#v", kind)
|
||||
}
|
||||
|
Reference in New Issue
Block a user