Remove util and privatize selectByGvk

This commit is contained in:
Jeffrey Regan
2018-06-01 14:17:56 -07:00
parent 57f3743be8
commit d0c6a824c8
8 changed files with 11 additions and 15 deletions

View File

@@ -21,7 +21,6 @@ import (
"fmt"
"github.com/kubernetes-sigs/kustomize/pkg/resmap"
"github.com/kubernetes-sigs/kustomize/pkg/types"
)
// namePrefixTransformer contains the prefix and the path config for each field that
@@ -62,7 +61,7 @@ func (o *namePrefixTransformer) Transform(m resmap.ResMap) error {
obj := m[id].Unstruct()
objMap := obj.UnstructuredContent()
for _, path := range o.pathConfigs {
if !types.SelectByGVK(id.Gvk(), path.GroupVersionKind) {
if !selectByGVK(id.Gvk(), path.GroupVersionKind) {
continue
}
err := mutateField(objMap, path.Path, path.CreateIfNotPresent, o.addPrefix)