mirror of
https://github.com/rancher/rke.git
synced 2025-09-15 06:30:27 +00:00
Switch to go modules
This commit is contained in:
8
vendor/k8s.io/client-go/tools/reference/ref.go
generated
vendored
8
vendor/k8s.io/client-go/tools/reference/ref.go
generated
vendored
@@ -86,10 +86,14 @@ func GetReference(scheme *runtime.Scheme, obj runtime.Object) (*v1.ObjectReferen
|
||||
}
|
||||
// example paths: /<prefix>/<version>/*
|
||||
parts := strings.Split(selfLinkUrl.Path, "/")
|
||||
if len(parts) < 3 {
|
||||
if len(parts) < 4 {
|
||||
return nil, fmt.Errorf("unexpected self link format: '%v'; got version '%v'", selfLink, version)
|
||||
}
|
||||
version = parts[2]
|
||||
if parts[1] == "api" {
|
||||
version = parts[2]
|
||||
} else {
|
||||
version = parts[2] + "/" + parts[3]
|
||||
}
|
||||
}
|
||||
|
||||
// only has list metadata
|
||||
|
Reference in New Issue
Block a user