@@ -172,7 +172,7 @@ type MutateFn func() error
172
172
173
173
// AddFinalizer accepts a metav1 object and adds the provided finalizer if not present.
174
174
func AddFinalizer (o metav1.Object , finalizer string ) {
175
- newFinalizers := AddString (o .GetFinalizers (), finalizer )
175
+ newFinalizers := addString (o .GetFinalizers (), finalizer )
176
176
o .SetFinalizers (newFinalizers )
177
177
}
178
178
@@ -189,7 +189,7 @@ func AddFinalizerIfPossible(o runtime.Object, finalizer string) error {
189
189
190
190
// RemoveFinalizer accepts a metav1 object and removes the provided finalizer if present.
191
191
func RemoveFinalizer (o metav1.Object , finalizer string ) {
192
- newFinalizers := RemoveString (o .GetFinalizers (), finalizer )
192
+ newFinalizers := removeString (o .GetFinalizers (), finalizer )
193
193
o .SetFinalizers (newFinalizers )
194
194
}
195
195
@@ -204,8 +204,8 @@ func RemoveFinalizerIfPossible(o runtime.Object, finalizer string) error {
204
204
return nil
205
205
}
206
206
207
- // AddString returns a []string with s appended if it is not already found in the provided slice.
208
- func AddString (slice []string , s string ) []string {
207
+ // addString returns a []string with s appended if it is not already found in the provided slice.
208
+ func addString (slice []string , s string ) []string {
209
209
for _ , item := range slice {
210
210
if item == s {
211
211
return slice
@@ -214,8 +214,8 @@ func AddString(slice []string, s string) []string {
214
214
return append (slice , s )
215
215
}
216
216
217
- // RemoveString returns a newly created []string that contains all items from slice that are not equal to s.
218
- func RemoveString (slice []string , s string ) []string {
217
+ // removeString returns a newly created []string that contains all items from slice that are not equal to s.
218
+ func removeString (slice []string , s string ) []string {
219
219
new := make ([]string , 0 )
220
220
for _ , item := range slice {
221
221
if item == s {
0 commit comments