We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 22b547b commit 9ff3188Copy full SHA for 9ff3188
advisor/advisor.go
@@ -61,8 +61,10 @@ func (advisor *Advisor) PrintReport() {
61
fmt.Println(string(jsonOutput))
62
}
63
64
-func (advisor *Advisor) PrintPodSecurityPolicy() {
+func (advisor *Advisor) PrintPodSecurityPolicy() error {
65
e := k8sJSON.NewYAMLSerializer(k8sJSON.DefaultMetaFactory, nil, nil)
66
67
- e.Encode(advisor.podSecurityPolicy, os.Stdout)
+ err := e.Encode(advisor.podSecurityPolicy, os.Stdout)
68
+
69
+ return err
70
kube-psp-advisor.go
@@ -45,5 +45,9 @@ func main() {
45
return
46
47
48
- advisor.PrintPodSecurityPolicy()
+ err = advisor.PrintPodSecurityPolicy()
49
50
+ if err != nil {
51
+ panic(err)
52
+ }
53
0 commit comments