spesnova / iruka

A lightweight container platform
MIT License
3 stars 0 forks source link

Set command get panic if value if missing #23

Closed spesnova closed 9 years ago

spesnova commented 9 years ago

WHAT

When I run iruka set, if the value is missing, I got following error:

$ ./iruka set HELLO
panic: runtime error: index out of range

goroutine 1 [running]:
main.runSet(0xc2080721c0)
    /Users/seigo/src/github.com/spesnova/iruka/iruka/set.go:42 +0x4c9
github.com/codegangsta/cli.Command.Run(0x3c2710, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4007f0, 0x1a, 0x46d170, ...)
    /Users/seigo/src/github.com/codegangsta/cli/command.go:118 +0x104b
github.com/codegangsta/cli.(*App).Run(0xc20808a000, 0xc20800a000, 0x3, 0x3, 0x0, 0x0)
    /Users/seigo/src/github.com/codegangsta/cli/app.go:154 +0xd04
main.main()
    /Users/seigo/src/github.com/spesnova/iruka/iruka/iruka.go:31 +0x1d3

goroutine 2 [runnable]:
runtime.forcegchelper()
    /usr/local/Cellar/go/1.4.2/libexec/src/runtime/proc.go:90
runtime.goexit()
    /usr/local/Cellar/go/1.4.2/libexec/src/runtime/asm_amd64.s:2232 +0x1

goroutine 3 [runnable]:
runtime.bgsweep()
    /usr/local/Cellar/go/1.4.2/libexec/src/runtime/mgc0.go:82
runtime.goexit()
    /usr/local/Cellar/go/1.4.2/libexec/src/runtime/asm_amd64.s:2232 +0x1

goroutine 4 [runnable]:
runtime.runfinq()
    /usr/local/Cellar/go/1.4.2/libexec/src/runtime/malloc.go:712
runtime.goexit()
    /usr/local/Cellar/go/1.4.2/libexec/src/runtime/asm_amd64.s:2232 +0x1