mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-08 04:32:37 +00:00
Clients should not check conditions, UpdateStatus() is inconsistent
Corrects some of the cargo culting that has crept into the API.
This commit is contained in:
@@ -190,6 +190,10 @@ func (r *Request) Name(resourceName string) *Request {
|
||||
if r.err != nil {
|
||||
return r
|
||||
}
|
||||
if len(resourceName) == 0 {
|
||||
r.err = fmt.Errorf("resource name may not be empty")
|
||||
return r
|
||||
}
|
||||
if len(r.resourceName) != 0 {
|
||||
r.err = fmt.Errorf("resource name already set to %q, cannot change to %q", r.resourceName, resourceName)
|
||||
return r
|
||||
|
Reference in New Issue
Block a user