mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-05 18:24:07 +00:00
Fix compile errors in DeleteCollection
This commit is contained in:
parent
439d7a721e
commit
b279227d83
@ -165,19 +165,19 @@ var deleteCollectionTemplate = `
|
|||||||
// DeleteCollection deletes a collection of objects.
|
// DeleteCollection deletes a collection of objects.
|
||||||
func (c *$.type|privatePlural$) DeleteCollection(options *$.apiDeleteOptions|raw$, listOptions $.apiListOptions|raw$) error {
|
func (c *$.type|privatePlural$) DeleteCollection(options *$.apiDeleteOptions|raw$, listOptions $.apiListOptions|raw$) error {
|
||||||
if options == nil {
|
if options == nil {
|
||||||
return c.Client.Delete().
|
return c.client.Delete().
|
||||||
NamespaceIfScoped(e.namespace, len(e.namespace) > 0).
|
NamespaceIfScoped(c.ns, len(c.ns) > 0).
|
||||||
Resource("$.type|privatePlural$").
|
Resource("$.type|privatePlural$").
|
||||||
VersionedParams(&listOptions, api.Scheme).
|
VersionedParams(&listOptions, api.Scheme).
|
||||||
Do().
|
Do().
|
||||||
Error()
|
Error()
|
||||||
}
|
}
|
||||||
body, err := api.Scheme.EncodeToVersion(options, c.client.APIVersion())
|
body, err := api.Scheme.EncodeToVersion(options, c.client.APIVersion().String())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
return c.Client.Delete().
|
return c.client.Delete().
|
||||||
NamespaceIfScoped(e.namespace, len(e.namespace) > 0).
|
NamespaceIfScoped(c.ns, len(c.ns) > 0).
|
||||||
Resource("$.type|privatePlural$").
|
Resource("$.type|privatePlural$").
|
||||||
VersionedParams(&listOptions, api.Scheme).
|
VersionedParams(&listOptions, api.Scheme).
|
||||||
Body(body).
|
Body(body).
|
||||||
|
Loading…
Reference in New Issue
Block a user