Revert "Remove unused utility function StringInSplice."

This reverts commit 43b0f2d925.
This commit is contained in:
Eyob Tefera
2020-08-09 07:30:40 +00:00
parent b3f147d012
commit bd7d0f864b

View File

@@ -176,6 +176,16 @@ func (mf *kustomizationFile) Write(kustomization *types.Kustomization) error {
return mf.fSys.WriteFile(mf.path, data)
}
// StringInSlice returns true if the string is in the slice.
func StringInSlice(str string, list []string) bool {
for _, v := range list {
if v == str {
return true
}
}
return false
}
func (mf *kustomizationFile) parseCommentedFields(content []byte) error {
buffer := bytes.NewBuffer(content)
var comments [][]byte