Panic when doing devtool start with minikube
NOTES:
1. Get the application URL by running these commands:
http://swagger.local/
💥 addon ingress was already enabled
Applying minikube ingress configuration.
Warning: kubectl apply should be used on resource created by either kubectl create --save-config or kubectl apply
configmap/nginx-load-balancer-conf configured
* http://192.168.99.105:30080
0
panic: runtime error: index out of range [1] with length 0
goroutine 1 [running]:
git.psu.edu/k8s/devtool/cmd.initHostsfile(0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc0001dbf90, 0xc000240960)
/home/cpb113/swe/golang/util/devtool/cmd/start.go:578 +0x360
git.psu.edu/k8s/devtool/cmd.setupHostsFile(0x8e2101, 0x995f42)
/home/cpb113/swe/golang/util/devtool/cmd/start.go:541 +0x34
git.psu.edu/k8s/devtool/cmd.start()
/home/cpb113/swe/golang/util/devtool/cmd/start.go:254 +0x301
git.psu.edu/k8s/devtool/cmd.glob..func20(0xdb4fe0, 0xddaa28, 0x0, 0x0)
/home/cpb113/swe/golang/util/devtool/cmd/start.go:43 +0x20
github.com/spf13/cobra.(*Command).execute(0xdb4fe0, 0xddaa28, 0x0, 0x0, 0xdb4fe0, 0xddaa28)
/home/cpb113/gopath/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:846 +0x2aa
github.com/spf13/cobra.(*Command).ExecuteC(0xdb4800, 0x0, 0x0, 0x0)
/home/cpb113/gopath/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:950 +0x349
github.com/spf13/cobra.(*Command).Execute(...)
/home/cpb113/gopath/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:887
git.psu.edu/k8s/devtool/cmd.Execute()
/home/cpb113/swe/golang/util/devtool/cmd/root.go:57 +0x2d
main.main()
/home/cpb113/swe/golang/util/devtool/devtool.go:6 +0x20