merklecounty/rget

`rget submit` panics

Closed this issue · 1 comments

luxas commented

Hi @philips, thanks for this project 😄!

I tried it out, and found a nil panic for rget submit:

$ rget submit
panic: runtime error: index out of range

goroutine 1 [running]:
go.merklecounty.com/rget/rget/cmd.submit(0x17840c0, 0x17afae0, 0x0, 0x0)
	/home/brandon/src/github.com/merklecounty/rget/rget/cmd/submit.go:45 +0x63f
github.com/spf13/cobra.(*Command).execute(0x17840c0, 0x17afae0, 0x0, 0x0, 0x17840c0, 0x17afae0)
	/home/brandon/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:830 +0x2ae
github.com/spf13/cobra.(*Command).ExecuteC(0x1784840, 0xc0001d3f68, 0xc83f3e, 0x1784840)
	/home/brandon/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:914 +0x2fc
github.com/spf13/cobra.(*Command).Execute(...)
	/home/brandon/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:864
go.merklecounty.com/rget/rget/cmd.Execute()
	/home/brandon/src/github.com/merklecounty/rget/rget/cmd/root.go:64 +0x32
main.main()
	/home/brandon/src/github.com/merklecounty/rget/rget/main.go:20 +0x20