mirror of
https://github.com/kyverno/kyverno.git
synced 2024-12-14 11:57:48 +00:00
fixed yaml package
This commit is contained in:
parent
0170e1b19c
commit
b9b28b40fb
1 changed files with 2 additions and 2 deletions
|
@ -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, "", " ")
|
||||
|
|
Loading…
Reference in a new issue