kubemq-io / kubemqctl

Kubemqctl is a command line interface (CLI) for KubeMQ , Kubernetes Message Broker
https://kubemq.io
Apache License 2.0
22 stars 9 forks source link

Runtime error: index out of range [0] with length 0 #17

Closed weizenberg closed 1 year ago

weizenberg commented 4 years ago

Hey,

After running kubemqctl config and selected a namespace with installed operator (but without any clusters yet), I received the following bug:

panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]:

github.com/kubemq-io/kubemqctl/cmd/config.(*ConfigOptions).Run(0xc00000ea00, 0x26e9e00, 0xc000307b40, 0x0, 0x0) D:/Development/bitbucket/go/projects/kubemq/kubemqctl/cmd/config/config.go:148 +0x24d5

github.com/kubemq-io/kubemqctl/cmd/config.NewCmdConfig.func1(0xc0004f0780, 0x32e7778, 0x0, 0x0) D:/Development/bitbucket/go/projects/kubemq/kubemqctl/cmd/config/config.go:42 +0xef

github.com/spf13/cobra.(*Command).execute(0xc0004f0780, 0x32e7778, 0x0, 0x0, 0xc0004f0780, 0x32e7778) D:/Development/bitbucket/go/projects/kubemq/kubemqctl/vendor/github.com/spf13/cobra/command.go:830 +0x29d

github.com/spf13/cobra.(*Command).ExecuteC(0x32a7820, 0xc0004dff00, 0x1, 0x1) D:/Development/bitbucket/go/projects/kubemq/kubemqctl/vendor/github.com/spf13/cobra/command.go:914 +0x2fb

github.com/spf13/cobra.(*Command).Execute(...) D:/Development/bitbucket/go/projects/kubemq/kubemqctl/vendor/github.com/spf13/cobra/command.go:864

github.com/kubemq-io/kubemqctl/cmd/root.Execute(0x268ae6c, 0x6, 0xc00000c0a0, 0x2, 0x2) D:/Development/bitbucket/go/projects/kubemq/kubemqctl/cmd/root/root.go:79 +0x596

main.main() D:/Development/bitbucket/go/projects/kubemq/kubemqctl/main.go:11 +0x5d

kubemq commented 1 year ago

fixed in version v3.7.0