- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for UnsafeGuessKindToResource (0.4 sec)
-
staging/src/k8s.io/apimachinery/pkg/api/meta/restmapper.go
var unpluralizedSuffixes = []string{ "endpoints", } // UnsafeGuessKindToResource converts Kind to a resource name. // Broken. This method only "sort of" works when used outside of this package. It assumes that Kinds and Resources match // and they aren't guaranteed to do so. func UnsafeGuessKindToResource(kind schema.GroupVersionKind) ( /*plural*/ schema.GroupVersionResource /*singular*/, schema.GroupVersionResource) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Nov 17 01:55:47 UTC 2021 - 16.1K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/api/meta/restmapper_test.go
// Add "s" otherwise {Kind: "lowercase", Plural: "lowercases", Singular: "lowercase"}, } for i, testCase := range testCases { version := schema.GroupVersion{} plural, singular := UnsafeGuessKindToResource(version.WithKind(testCase.Kind)) if singular != version.WithResource(testCase.Singular) || plural != version.WithResource(testCase.Plural) { t.Errorf("%d: unexpected plural and singular: %v %v", i, plural, singular)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sun Nov 01 08:38:57 UTC 2020 - 28.9K bytes - Viewed (0)