$ ./convert
2021/07/22 11:40:12 found root namespace: istio-system
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x1342136]
goroutine 1 [running]:
strings.(*Builder).String(...)
/opt/hostedtoolcache/go/1.14.14/x64/src/strings/builder.go:48
main.(*kubeClient).convert(0xc0004287b0, 0x0, 0x0)
/home/runner/work/security-policy-migrate/security-policy-migrate/k8s.go:198 +0x1176
main.rootCmd.func1(0xc00022b600, 0x22b1fa8, 0x0, 0x0, 0x0, 0x0)
/home/runner/work/security-policy-migrate/security-policy-migrate/main.go:48 +0xf7
github.com/spf13/cobra.(*Command).execute(0xc00022b600, 0xc00003c1d0, 0x0, 0x0, 0xc00022b600, 0xc00003c1d0)
/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:850 +0x453
github.com/spf13/cobra.(*Command).ExecuteC(0xc00022b600, 0x0, 0x0, 0xc00022b600)
/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:958 +0x349
github.com/spf13/cobra.(*Command).Execute(...)
/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:895
main.main()
/home/runner/work/security-policy-migrate/security-policy-migrate/main.go:22 +0xab
$ go version
go version go1.16.6 linux/amd64