@@ -5,12 +5,10 @@ import (
55 "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
66)
77
8- type MutatingFunc func (* unstructured.Unstructured ) (* unstructured.Unstructured , error )
9-
108type IPatchCollector interface {
119 sdkpkg.PatchCollector
1210
13- PatchWithMutatingFunc (fn MutatingFunc , apiVersion string , kind string , namespace string , name string , opts ... sdkpkg.PatchCollectorOption )
11+ PatchWithMutatingFunc (fn func ( * unstructured. Unstructured ) ( * unstructured. Unstructured , error ) , apiVersion string , kind string , namespace string , name string , opts ... sdkpkg.PatchCollectorOption )
1412}
1513
1614var _ IPatchCollector = (* PatchCollector )(nil )
@@ -114,7 +112,7 @@ func (dop *PatchCollector) JSONPatch(jsonPatch any, apiVersion, kind, namespace,
114112// Note: do not modify and return argument in filterFunc,
115113// use FromUnstructured to instantiate a concrete type or modify after DeepCopy.
116114func (dop * PatchCollector ) PatchWithMutatingFunc (
117- fn MutatingFunc ,
115+ fn func ( * unstructured. Unstructured ) ( * unstructured. Unstructured , error ) ,
118116 apiVersion , kind , namespace , name string , opts ... sdkpkg.PatchCollectorOption ,
119117) {
120118 dop .add (NewPatchWithMutatingFuncOperation (fn , apiVersion , kind , namespace , name , opts ... ))
0 commit comments