diff options
author | Kiran Kamineni <kiran.k.kamineni@intel.com> | 2019-04-24 11:39:17 -0700 |
---|---|---|
committer | Kiran Kamineni <kiran.k.kamineni@intel.com> | 2019-04-25 14:49:19 -0700 |
commit | 4095bd620f3ca4f4e6b6042f68829a895471fafa (patch) | |
tree | 67906e1a3ef06f6ac9fe65ad04cab7052af009f2 /src/k8splugin/internal | |
parent | 6e08385919be58ae316a637d21b43ee7aa8df39c (diff) |
Use the unstructured type for decode
Use the unstructured type in the into field.
This allows us to remove the convert part of the
code and also allows decoding for CRDs.
Issue-ID: MULTICLOUD-585
Change-Id: I27ecdba7127ce63137dfbcd1c0a6938343b4e759
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
Diffstat (limited to 'src/k8splugin/internal')
-rw-r--r-- | src/k8splugin/internal/utils.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/k8splugin/internal/utils.go b/src/k8splugin/internal/utils.go index 7785733d..681b1b52 100644 --- a/src/k8splugin/internal/utils.go +++ b/src/k8splugin/internal/utils.go @@ -42,7 +42,7 @@ type ResourceData struct { } // DecodeYAML reads a YAMl file to extract the Kubernetes object definition -var DecodeYAML = func(path string, into runtime.Object) (runtime.Object, error) { +func DecodeYAML(path string, into runtime.Object) (runtime.Object, error) { if _, err := os.Stat(path); err != nil { if os.IsNotExist(err) { return nil, pkgerrors.New("File " + path + " not found") |