Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for ParseKindArg (0.25 sec)

  1. staging/src/k8s.io/apimachinery/pkg/runtime/schema/group_version.go

    	if strings.Count(arg, ".") >= 2 {
    		s := strings.SplitN(arg, ".", 3)
    		gvr = &GroupVersionResource{Group: s[2], Version: s[1], Resource: s[0]}
    	}
    
    	return gvr, ParseGroupResource(arg)
    }
    
    // ParseKindArg takes the common style of string which may be either `Kind.group.com` or `Kind.version.group.com`
    // and parses it out into both possibilities. This code takes no responsibility for knowing which representation was intended
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 30 09:08:59 UTC 2023
    - 10.2K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apimachinery/pkg/runtime/schema/group_version_test.go

    	}
    	for i, test := range tests {
    		t.Run(test.input, func(t *testing.T) {
    			gvk, gk := ParseKindArg(test.input)
    			if (gvk != nil && test.gvk == nil) || (gvk == nil && test.gvk != nil) || (test.gvk != nil && *gvk != *test.gvk) {
    				t.Errorf("%d: expected output: %#v, got: %#v", i, test.gvk, gvk)
    			}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 15 01:46:00 UTC 2022
    - 7.2K bytes
    - Viewed (0)
  3. staging/src/k8s.io/cli-runtime/pkg/resource/builder.go

    	if gvk.Empty() {
    		gvk, _ = restMapper.KindFor(groupResource.WithVersion(""))
    	}
    	if !gvk.Empty() {
    		return restMapper.RESTMapping(gvk.GroupKind(), gvk.Version)
    	}
    
    	fullySpecifiedGVK, groupKind := schema.ParseKindArg(resourceOrKindArg)
    	if fullySpecifiedGVK == nil {
    		gvk := groupKind.WithVersion("")
    		fullySpecifiedGVK = &gvk
    	}
    
    	if !fullySpecifiedGVK.Empty() {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jul 03 10:17:56 UTC 2023
    - 37.2K bytes
    - Viewed (0)
Back to top