Skip to content

panic: runtime error: index out of range [1] with length 1 #137

@danie-dejager

Description

@danie-dejager

When lssh is run without a config and no hosts available:
image
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

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions