Fix panic in replace ingress command
testroman1043 opened this issue · 0 comments
./chkit replace ing
NAME HOST SERVICE
jhh.hub.containerum.io jhh.hub.containerum.io "/" -> svc1:16815
Select ingress to replace
- jhh.hub.containerum.io
Choose wisely: 1
panic: runtime error: index out of range
goroutine 1 [running]:
github.com/containerum/chkit/pkg/cli/ingress.Replace.func1(0xc420432280, 0x10bad68, 0x0, 0x0)
/home/tester/Projects/src/github.com/containerum/chkit/pkg/cli/ingress/replace.go:118 +0x23fd
github.com/containerum/chkit/vendor/github.com/spf13/cobra.(*Command).execute(0xc420432280, 0xc42009e080, 0x0, 0x0, 0xc420432280, 0xc42009e080)
/home/tester/Projects/src/github.com/containerum/chkit/vendor/github.com/spf13/cobra/command.go:766 +0x85c
github.com/containerum/chkit/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc420313b80, 0xb34d80, 0xc420435a80, 0xc)
/home/tester/Projects/src/github.com/containerum/chkit/vendor/github.com/spf13/cobra/command.go:852 +0x4a9
github.com/containerum/chkit/vendor/github.com/spf13/cobra.(*Command).Execute(0xc420313b80, 0xc420183ea0, 0xc)
/home/tester/Projects/src/github.com/containerum/chkit/vendor/github.com/spf13/cobra/command.go:800 +0x39
github.com/containerum/chkit/pkg/cli.Root(0x455c80, 0x4296a4)
/home/tester/Projects/src/github.com/containerum/chkit/pkg/cli/root.go:93 +0xbee
main.main()
/home/tester/Projects/src/github.com/containerum/chkit/cmd/chkit/chkit.go:19 +0x34