diff --git a/internal/k8sdeps/kunstruct/factory.go b/internal/k8sdeps/kunstruct/factory.go index c1d130f9f..8d0058951 100644 --- a/internal/k8sdeps/kunstruct/factory.go +++ b/internal/k8sdeps/kunstruct/factory.go @@ -19,6 +19,7 @@ package kunstruct import ( "bytes" "io" + "strings" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/util/yaml" @@ -60,6 +61,10 @@ func (kf *KunstructurerFactoryImpl) SliceFromBytes( return result, nil } +func isEmptyYamlError(err error) bool { + return strings.Contains(err.Error(), "is missing in 'null'") +} + // FromMap returns an instance of Kunstructured. func (kf *KunstructurerFactoryImpl) FromMap( m map[string]interface{}) ifc.Kunstructured { diff --git a/internal/k8sdeps/kunstruct/kunstruct.go b/internal/k8sdeps/kunstruct/kunstruct.go index 968597707..922aead81 100644 --- a/internal/k8sdeps/kunstruct/kunstruct.go +++ b/internal/k8sdeps/kunstruct/kunstruct.go @@ -104,7 +104,3 @@ func getFieldValue(m map[string]interface{}, pathToField []string) (string, erro return "", fmt.Errorf("%#v is not expected to be a primitive type", typedV) } } - -func isEmptyYamlError(err error) bool { - return strings.Contains(err.Error(), "is missing in 'null'") -}