@@ -385,7 +385,7 @@ func (c *Fake$.type|publicPlural$) List(ctx context.Context, opts $.ListOptions|
385
385
`
386
386
387
387
var getTemplate = `
388
- // Get takes name of the $.type|private$, and returns the corresponding $.resultType|private$ object, and an error if there is any.
388
+ // Get takes name of the _ $.type|private$, and returns the corresponding $.resultType|private$ object, and an error if there is any.
389
389
func (c *Fake$.type|publicPlural$) Get(ctx context.Context, name string, options $.GetOptions|raw$) (result *$.resultType|raw$, err error) {
390
390
obj, err := c.Fake.
391
391
$if .namespaced$Invokes($.NewGetAction|raw$($.type|allLowercasePlural$Resource, c.ns, name), &$.resultType|raw${})
@@ -398,11 +398,11 @@ func (c *Fake$.type|publicPlural$) Get(ctx context.Context, name string, options
398
398
`
399
399
400
400
var getSubresourceTemplate = `
401
- // Get takes name of the $.type|private$, and returns the corresponding $.resultType|private$ object, and an error if there is any.
402
- func (c *Fake$.type|publicPlural$) Get(ctx context.Context, $.type|private$Name string, options $.GetOptions|raw$) (result *$.resultType|raw$, err error) {
401
+ // Get takes name of the _ $.type|private$, and returns the corresponding $.resultType|private$ object, and an error if there is any.
402
+ func (c *Fake$.type|publicPlural$) Get(ctx context.Context, _ $.type|private$Name string, options $.GetOptions|raw$) (result *$.resultType|raw$, err error) {
403
403
obj, err := c.Fake.
404
- $if .namespaced$Invokes($.NewGetSubresourceAction|raw$($.type|allLowercasePlural$Resource, c.ns, "$.subresourcePath$", $.type|private$Name), &$.resultType|raw${})
405
- $else$Invokes($.NewRootGetSubresourceAction|raw$($.type|allLowercasePlural$Resource, "$.subresourcePath$", $.type|private$Name), &$.resultType|raw${})$end$
404
+ $if .namespaced$Invokes($.NewGetSubresourceAction|raw$($.type|allLowercasePlural$Resource, c.ns, "$.subresourcePath$", _ $.type|private$Name), &$.resultType|raw${})
405
+ $else$Invokes($.NewRootGetSubresourceAction|raw$($.type|allLowercasePlural$Resource, "$.subresourcePath$", _ $.type|private$Name), &$.resultType|raw${})$end$
406
406
if obj == nil {
407
407
return nil, err
408
408
}
@@ -411,7 +411,7 @@ func (c *Fake$.type|publicPlural$) Get(ctx context.Context, $.type|private$Name
411
411
`
412
412
413
413
var deleteTemplate = `
414
- // Delete takes name of the $.type|private$ and deletes it. Returns an error if one occurs.
414
+ // Delete takes name of the _ $.type|private$ and deletes it. Returns an error if one occurs.
415
415
func (c *Fake$.type|publicPlural$) Delete(ctx context.Context, name string, opts $.DeleteOptions|raw$) error {
416
416
_, err := c.Fake.
417
417
$if .namespaced$Invokes($.NewDeleteActionWithOptions|raw$($.type|allLowercasePlural$Resource, c.ns, name, opts), &$.type|raw${})
@@ -431,11 +431,11 @@ func (c *Fake$.type|publicPlural$) DeleteCollection(ctx context.Context, opts $.
431
431
}
432
432
`
433
433
var createTemplate = `
434
- // Create takes the representation of a $.inputType|private$ and creates it. Returns the server's representation of the $.resultType|private$, and an error, if there is any.
435
- func (c *Fake$.type|publicPlural$) Create(ctx context.Context, $.inputType|private$ *$.inputType|raw$, opts $.CreateOptions|raw$) (result *$.resultType|raw$, err error) {
434
+ // Create takes the representation of a _ $.inputType|private$ and creates it. Returns the server's representation of the $.resultType|private$, and an error, if there is any.
435
+ func (c *Fake$.type|publicPlural$) Create(ctx context.Context, _ $.inputType|private$ *$.inputType|raw$, opts $.CreateOptions|raw$) (result *$.resultType|raw$, err error) {
436
436
obj, err := c.Fake.
437
- $if .namespaced$Invokes($.NewCreateAction|raw$($.inputType|allLowercasePlural$Resource, c.ns, $.inputType|private$), &$.resultType|raw${})
438
- $else$Invokes($.NewRootCreateAction|raw$($.inputType|allLowercasePlural$Resource, $.inputType|private$), &$.resultType|raw${})$end$
437
+ $if .namespaced$Invokes($.NewCreateAction|raw$($.inputType|allLowercasePlural$Resource, c.ns, _ $.inputType|private$), &$.resultType|raw${})
438
+ $else$Invokes($.NewRootCreateAction|raw$($.inputType|allLowercasePlural$Resource, _ $.inputType|private$), &$.resultType|raw${})$end$
439
439
if obj == nil {
440
440
return nil, err
441
441
}
@@ -444,11 +444,11 @@ func (c *Fake$.type|publicPlural$) Create(ctx context.Context, $.inputType|priva
444
444
`
445
445
446
446
var createSubresourceTemplate = `
447
- // Create takes the representation of a $.inputType|private$ and creates it. Returns the server's representation of the $.resultType|private$, and an error, if there is any.
448
- func (c *Fake$.type|publicPlural$) Create(ctx context.Context, $.type|private$Name string, $.inputType|private$ *$.inputType|raw$, opts $.CreateOptions|raw$) (result *$.resultType|raw$, err error) {
447
+ // Create takes the representation of a _ $.inputType|private$ and creates it. Returns the server's representation of the $.resultType|private$, and an error, if there is any.
448
+ func (c *Fake$.type|publicPlural$) Create(ctx context.Context, _ $.type|private$Name string, _ $.inputType|private$ *$.inputType|raw$, opts $.CreateOptions|raw$) (result *$.resultType|raw$, err error) {
449
449
obj, err := c.Fake.
450
- $if .namespaced$Invokes($.NewCreateSubresourceAction|raw$($.type|allLowercasePlural$Resource, $.type|private$Name, "$.subresourcePath$", c.ns, $.inputType|private$), &$.resultType|raw${})
451
- $else$Invokes($.NewRootCreateSubresourceAction|raw$($.type|allLowercasePlural$Resource, $.type|private$Name, "$.subresourcePath$", $.inputType|private$), &$.resultType|raw${})$end$
450
+ $if .namespaced$Invokes($.NewCreateSubresourceAction|raw$($.type|allLowercasePlural$Resource, _ $.type|private$Name, "$.subresourcePath$", c.ns, _ $.inputType|private$), &$.resultType|raw${})
451
+ $else$Invokes($.NewRootCreateSubresourceAction|raw$($.type|allLowercasePlural$Resource, _ $.type|private$Name, "$.subresourcePath$", _ $.inputType|private$), &$.resultType|raw${})$end$
452
452
if obj == nil {
453
453
return nil, err
454
454
}
@@ -457,11 +457,11 @@ func (c *Fake$.type|publicPlural$) Create(ctx context.Context, $.type|private$Na
457
457
`
458
458
459
459
var updateTemplate = `
460
- // Update takes the representation of a $.inputType|private$ and updates it. Returns the server's representation of the $.resultType|private$, and an error, if there is any.
461
- func (c *Fake$.type|publicPlural$) Update(ctx context.Context, $.inputType|private$ *$.inputType|raw$, opts $.UpdateOptions|raw$) (result *$.resultType|raw$, err error) {
460
+ // Update takes the representation of a _ $.inputType|private$ and updates it. Returns the server's representation of the $.resultType|private$, and an error, if there is any.
461
+ func (c *Fake$.type|publicPlural$) Update(ctx context.Context, _ $.inputType|private$ *$.inputType|raw$, opts $.UpdateOptions|raw$) (result *$.resultType|raw$, err error) {
462
462
obj, err := c.Fake.
463
- $if .namespaced$Invokes($.NewUpdateAction|raw$($.inputType|allLowercasePlural$Resource, c.ns, $.inputType|private$), &$.resultType|raw${})
464
- $else$Invokes($.NewRootUpdateAction|raw$($.inputType|allLowercasePlural$Resource, $.inputType|private$), &$.resultType|raw${})$end$
463
+ $if .namespaced$Invokes($.NewUpdateAction|raw$($.inputType|allLowercasePlural$Resource, c.ns, _ $.inputType|private$), &$.resultType|raw${})
464
+ $else$Invokes($.NewRootUpdateAction|raw$($.inputType|allLowercasePlural$Resource, _ $.inputType|private$), &$.resultType|raw${})$end$
465
465
if obj == nil {
466
466
return nil, err
467
467
}
@@ -470,11 +470,11 @@ func (c *Fake$.type|publicPlural$) Update(ctx context.Context, $.inputType|priva
470
470
`
471
471
472
472
var updateSubresourceTemplate = `
473
- // Update takes the representation of a $.inputType|private$ and updates it. Returns the server's representation of the $.resultType|private$, and an error, if there is any.
474
- func (c *Fake$.type|publicPlural$) Update(ctx context.Context, $.type|private$Name string, $.inputType|private$ *$.inputType|raw$, opts $.UpdateOptions|raw$) (result *$.resultType|raw$, err error) {
473
+ // Update takes the representation of a _ $.inputType|private$ and updates it. Returns the server's representation of the $.resultType|private$, and an error, if there is any.
474
+ func (c *Fake$.type|publicPlural$) Update(ctx context.Context, _ $.type|private$Name string, _ $.inputType|private$ *$.inputType|raw$, opts $.UpdateOptions|raw$) (result *$.resultType|raw$, err error) {
475
475
obj, err := c.Fake.
476
- $if .namespaced$Invokes($.NewUpdateSubresourceAction|raw$($.type|allLowercasePlural$Resource, "$.subresourcePath$", c.ns, $.inputType|private$), &$.inputType|raw${})
477
- $else$Invokes($.NewRootUpdateSubresourceAction|raw$($.type|allLowercasePlural$Resource, "$.subresourcePath$", $.inputType|private$), &$.resultType|raw${})$end$
476
+ $if .namespaced$Invokes($.NewUpdateSubresourceAction|raw$($.type|allLowercasePlural$Resource, "$.subresourcePath$", c.ns, _ $.inputType|private$), &$.inputType|raw${})
477
+ $else$Invokes($.NewRootUpdateSubresourceAction|raw$($.type|allLowercasePlural$Resource, "$.subresourcePath$", _ $.inputType|private$), &$.resultType|raw${})$end$
478
478
if obj == nil {
479
479
return nil, err
480
480
}
@@ -485,10 +485,10 @@ func (c *Fake$.type|publicPlural$) Update(ctx context.Context, $.type|private$Na
485
485
var updateStatusTemplate = `
486
486
// UpdateStatus was generated because the type contains a Status member.
487
487
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
488
- func (c *Fake$.type|publicPlural$) UpdateStatus(ctx context.Context, $.type|private$ *$.type|raw$, opts $.UpdateOptions|raw$) (*$.type|raw$, error) {
488
+ func (c *Fake$.type|publicPlural$) UpdateStatus(ctx context.Context, _ $.type|private$ *$.type|raw$, opts $.UpdateOptions|raw$) (*$.type|raw$, error) {
489
489
obj, err := c.Fake.
490
- $if .namespaced$Invokes($.NewUpdateSubresourceAction|raw$($.type|allLowercasePlural$Resource, "status", c.ns, $.type|private$), &$.type|raw${})
491
- $else$Invokes($.NewRootUpdateSubresourceAction|raw$($.type|allLowercasePlural$Resource, "status", $.type|private$), &$.type|raw${})$end$
490
+ $if .namespaced$Invokes($.NewUpdateSubresourceAction|raw$($.type|allLowercasePlural$Resource, "status", c.ns, _ $.type|private$), &$.type|raw${})
491
+ $else$Invokes($.NewRootUpdateSubresourceAction|raw$($.type|allLowercasePlural$Resource, "status", _ $.type|private$), &$.type|raw${})$end$
492
492
if obj == nil {
493
493
return nil, err
494
494
}
@@ -520,17 +520,17 @@ func (c *Fake$.type|publicPlural$) Patch(ctx context.Context, name string, pt $.
520
520
521
521
var applyTemplate = `
522
522
// Apply takes the given apply declarative configuration, applies it and returns the applied $.resultType|private$.
523
- func (c *Fake$.type|publicPlural$) Apply(ctx context.Context, $.inputType|private$ *$.inputApplyConfig|raw$, opts $.ApplyOptions|raw$) (result *$.resultType|raw$, err error) {
524
- if $.inputType|private$ == nil {
525
- return nil, fmt.Errorf("$.inputType|private$ provided to Apply must not be nil")
523
+ func (c *Fake$.type|publicPlural$) Apply(ctx context.Context, _ $.inputType|private$ *$.inputApplyConfig|raw$, opts $.ApplyOptions|raw$) (result *$.resultType|raw$, err error) {
524
+ if _ $.inputType|private$ == nil {
525
+ return nil, fmt.Errorf("_ $.inputType|private$ provided to Apply must not be nil")
526
526
}
527
- data, err := $.jsonMarshal|raw$($.inputType|private$)
527
+ data, err := $.jsonMarshal|raw$(_ $.inputType|private$)
528
528
if err != nil {
529
529
return nil, err
530
530
}
531
- name := $.inputType|private$.Name
531
+ name := _ $.inputType|private$.Name
532
532
if name == nil {
533
- return nil, fmt.Errorf("$.inputType|private$.Name must be provided to Apply")
533
+ return nil, fmt.Errorf("_ $.inputType|private$.Name must be provided to Apply")
534
534
}
535
535
obj, err := c.Fake.
536
536
$if .namespaced$Invokes($.NewPatchSubresourceAction|raw$($.type|allLowercasePlural$Resource, c.ns, *name, $.ApplyPatchType|raw$, data), &$.resultType|raw${})
@@ -545,17 +545,17 @@ func (c *Fake$.type|publicPlural$) Apply(ctx context.Context, $.inputType|privat
545
545
var applyStatusTemplate = `
546
546
// ApplyStatus was generated because the type contains a Status member.
547
547
// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
548
- func (c *Fake$.type|publicPlural$) ApplyStatus(ctx context.Context, $.inputType|private$ *$.inputApplyConfig|raw$, opts $.ApplyOptions|raw$) (result *$.resultType|raw$, err error) {
549
- if $.inputType|private$ == nil {
550
- return nil, fmt.Errorf("$.inputType|private$ provided to Apply must not be nil")
548
+ func (c *Fake$.type|publicPlural$) ApplyStatus(ctx context.Context, _ $.inputType|private$ *$.inputApplyConfig|raw$, opts $.ApplyOptions|raw$) (result *$.resultType|raw$, err error) {
549
+ if _ $.inputType|private$ == nil {
550
+ return nil, fmt.Errorf("_ $.inputType|private$ provided to Apply must not be nil")
551
551
}
552
- data, err := $.jsonMarshal|raw$($.inputType|private$)
552
+ data, err := $.jsonMarshal|raw$(_ $.inputType|private$)
553
553
if err != nil {
554
554
return nil, err
555
555
}
556
- name := $.inputType|private$.Name
556
+ name := _ $.inputType|private$.Name
557
557
if name == nil {
558
- return nil, fmt.Errorf("$.inputType|private$.Name must be provided to Apply")
558
+ return nil, fmt.Errorf("_ $.inputType|private$.Name must be provided to Apply")
559
559
}
560
560
obj, err := c.Fake.
561
561
$if .namespaced$Invokes($.NewPatchSubresourceAction|raw$($.type|allLowercasePlural$Resource, c.ns, *name, $.ApplyPatchType|raw$, data, "status"), &$.resultType|raw${})
@@ -570,17 +570,17 @@ func (c *Fake$.type|publicPlural$) ApplyStatus(ctx context.Context, $.inputType|
570
570
var applySubresourceTemplate = `
571
571
// Apply takes top resource name and the apply declarative configuration for $.subresourcePath$,
572
572
// applies it and returns the applied $.resultType|private$, and an error, if there is any.
573
- func (c *Fake$.type|publicPlural$) Apply(ctx context.Context, $.type|private$Name string, $.inputType|private$ *$.inputApplyConfig|raw$, opts $.ApplyOptions|raw$) (result *$.resultType|raw$, err error) {
574
- if $.inputType|private$ == nil {
575
- return nil, fmt.Errorf("$.inputType|private$ provided to Apply must not be nil")
573
+ func (c *Fake$.type|publicPlural$) Apply(ctx context.Context, _ $.type|private$Name string, _ $.inputType|private$ *$.inputApplyConfig|raw$, opts $.ApplyOptions|raw$) (result *$.resultType|raw$, err error) {
574
+ if _ $.inputType|private$ == nil {
575
+ return nil, fmt.Errorf("_ $.inputType|private$ provided to Apply must not be nil")
576
576
}
577
- data, err := $.jsonMarshal|raw$($.inputType|private$)
577
+ data, err := $.jsonMarshal|raw$(_ $.inputType|private$)
578
578
if err != nil {
579
579
return nil, err
580
580
}
581
581
obj, err := c.Fake.
582
- $if .namespaced$Invokes($.NewPatchSubresourceAction|raw$($.type|allLowercasePlural$Resource, c.ns, $.type|private$Name, $.ApplyPatchType|raw$, data, "status"), &$.resultType|raw${})
583
- $else$Invokes($.NewRootPatchSubresourceAction|raw$($.type|allLowercasePlural$Resource, $.type|private$Name, $.ApplyPatchType|raw$, data, "status"), &$.resultType|raw${})$end$
582
+ $if .namespaced$Invokes($.NewPatchSubresourceAction|raw$($.type|allLowercasePlural$Resource, c.ns, _ $.type|private$Name, $.ApplyPatchType|raw$, data, "status"), &$.resultType|raw${})
583
+ $else$Invokes($.NewRootPatchSubresourceAction|raw$($.type|allLowercasePlural$Resource, _ $.type|private$Name, $.ApplyPatchType|raw$, data, "status"), &$.resultType|raw${})$end$
584
584
if obj == nil {
585
585
return nil, err
586
586
}
0 commit comments