mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-11 09:02:53 +00:00
change patches to patchesStrategicMerge in tests and examples
This commit is contained in:
@@ -22,9 +22,19 @@ package patch
|
||||
type PatchStrategicMerge string
|
||||
|
||||
// Append appends a slice of patch paths to a PatchStategicMerge slice
|
||||
func Append(patches []PatchStrategicMerge, paths []string) []PatchStrategicMerge {
|
||||
func Append(patches []PatchStrategicMerge, paths ...string) []PatchStrategicMerge {
|
||||
for _, p := range paths {
|
||||
patches = append(patches, PatchStrategicMerge(p))
|
||||
}
|
||||
return patches
|
||||
}
|
||||
|
||||
// Exist determines if a patch path exists in a slice of PatchStategicMerge
|
||||
func Exist(patches []PatchStrategicMerge, path string) bool {
|
||||
for _, p := range patches {
|
||||
if p == PatchStrategicMerge(path) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user