Skip to content

Commit 2807fd2

Browse files
authored
website/context: Fix the Patch function signature in the Go client documentation (#4991)
Update the client.md documentation and change the function signature documented from client.UpdateOption to client.PatchOption for the patch method header. Signed-off-by: timflannagan <[email protected]>
1 parent b2380b5 commit 2807fd2

File tree

1 file changed

+2
-2
lines changed
  • website/content/en/docs/building-operators/golang/references

1 file changed

+2
-2
lines changed

website/content/en/docs/building-operators/golang/references/client.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ func (r *MemcachedReconciler) Reconcile(ctx context.Context, req ctrl.Request) (
275275
```Go
276276
// Patch patches the given obj in the Kubernetes cluster. obj must be a
277277
// struct pointer so that obj can be updated with the content returned by the Server.
278-
func (c Client) Patch(ctx context.Context, obj client.Object, patch client.Patch, opts ...client.UpdateOption) error
278+
func (c Client) Patch(ctx context.Context, obj client.Object, patch client.Patch, opts ...client.PatchOption) error
279279
```
280280

281281
A `client.PatchOption` is an interface that sets [`client.PatchOptions`][patch-options] fields. A `client.PatchOption` is created by using one of the provided implementations: [`DryRunAll`][dry-run-all], [`ForceOwnership`][force-ownership]. Generally these options are not needed.
@@ -496,7 +496,7 @@ func (r *MemcachedReconciler) Reconcile(ctx context.Context, req ctrl.Request) (
496496
}
497497
return ctrl.Result{Requeue: true}, nil
498498
} else {
499-
return ctrl.Result{}, err
499+
return ctrl.Result{}, err
500500
}
501501
}
502502

0 commit comments

Comments
 (0)