From b9b28b40fb85c28e7aad7f1cf933e287353f085d Mon Sep 17 00:00:00 2001 From: NoSkillGirl Date: Wed, 30 Sep 2020 00:51:07 +0530 Subject: [PATCH] fixed yaml package --- pkg/kyverno/validate/command.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/kyverno/validate/command.go b/pkg/kyverno/validate/command.go index f32cf2dc24..dd39bddb46 100644 --- a/pkg/kyverno/validate/command.go +++ b/pkg/kyverno/validate/command.go @@ -16,8 +16,8 @@ import ( _ "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/validation" - yamlv2 "gopkg.in/yaml.v2" log "sigs.k8s.io/controller-runtime/pkg/log" + yaml "sigs.k8s.io/yaml" ) func Command() *cobra.Command { @@ -82,7 +82,7 @@ func Command() *cobra.Command { return err } if outputType == "yaml" { - yamlPolicy, _ := yamlv2.Marshal(p) + yamlPolicy, _ := yaml.Marshal(p) fmt.Println(string(yamlPolicy)) } else { jsonPolicy, _ := json.MarshalIndent(p, "", " ")