Skip to content

Commit 483deea

Browse files
committed
Cleanup
1 parent 9c3df6a commit 483deea

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

pkg/client/interceptor/intercept.go

+4-8
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ import (
1010
"sigs.k8s.io/controller-runtime/pkg/client"
1111
)
1212

13-
// NewClient returns a new interceptor client that calls the functions in fns
14-
// instead of the underlying client's methods, if they are not nil.
13+
// NewClient returns a new interceptor client that calls the functions in fns instead of the underlying client's methods, if they are not nil.
1514
func NewClient(client client.WithWatch, fns Fns) client.WithWatch {
1615
return interceptor{client: client, fns: fns}
1716
}
@@ -45,8 +44,7 @@ type (
4544
// SubResourcePatchFn is a function that can be used to intercept SubResource PATCH calls.
4645
SubResourcePatchFn func(ctx context.Context, client client.SubResourceClient, obj client.Object, patch client.Patch, opts ...client.SubResourcePatchOption) error
4746

48-
// Fns contains functions that are called instead of the underlying
49-
// client's methods.
47+
// Fns contains functions that are called instead of the underlying client's methods.
5048
Fns struct {
5149
Get GetFn
5250
List ListFn
@@ -59,8 +57,7 @@ type (
5957
SubResource SubResourceFn
6058
}
6159

62-
// SubResourceFns is a set of functions that can be used to intercept
63-
// calls to a SubResourceClient.
60+
// SubResourceFns is a set of functions that can be used to intercept calls to a SubResourceClient.
6461
SubResourceFns struct {
6562
Get SubResourceGetFn
6663
Create SubResourceCreateFn
@@ -166,8 +163,7 @@ type subResourceInterceptor struct {
166163

167164
var _ client.SubResourceClient = &subResourceInterceptor{}
168165

169-
// NewSubResourceClient returns a SubResourceClient that intercepts calls to
170-
// the provided client with the provided functions.
166+
// NewSubResourceClient returns a SubResourceClient that intercepts calls to the provided client with the provided functions.
171167
func NewSubResourceClient(client client.SubResourceClient, fns SubResourceFns) client.SubResourceClient {
172168
return subResourceInterceptor{client: client, fns: fns}
173169
}

0 commit comments

Comments
 (0)