panic: runtime error: index out of range [1] with length 1
daniejstriata opened this issue · 2 comments
daniejstriata commented
When lssh is run without a config and no hosts available:
Pressing enter
creates this Panic:
panic: runtime error: index out of range [1] with length 1
goroutine 1 [running]:
github.com/blacknon/lssh/list.(*ListInfo).keyEvent(0xc000039490)
/home/danie.dejager/rpmbuild/BUILD/lssh-0.6.8/list/event.go:109 +0xa75
github.com/blacknon/lssh/list.(*ListInfo).View(0xc000039490)
/home/danie.dejager/rpmbuild/BUILD/lssh-0.6.8/list/list.go:196 +0x59
main.Lsftp.func1(0xc0001b2000)
/home/danie.dejager/rpmbuild/BUILD/lssh-0.6.8/cmd/lsftp/args.go:86 +0x2c8
github.com/urfave/cli.HandleAction({0x7c3740?, 0x8832f0?}, 0xc00014a600?)
/home/danie.dejager/rpmbuild/BUILD/lssh-0.6.8/vendor/github.com/urfave/cli/app.go:514 +0x50
github.com/urfave/cli.(*App).Run(0xc0001028c0, {0xc00011c870, 0x1, 0x1})
/home/danie.dejager/rpmbuild/BUILD/lssh-0.6.8/vendor/github.com/urfave/cli/app.go:274 +0x806
main.main()
/home/danie.dejager/rpmbuild/BUILD/lssh-0.6.8/cmd/lsftp/main.go:16 +0x65
blacknon commented
Thankyou.
Apparently, this error occurs when there is nothing in the configuration file.
I was able to reproduce the incident, so I will take action.
blacknon commented
Close. v0.6.9