mirror of
https://github.com/nalgeon/redka.git
synced 2025-10-05 07:56:49 +08:00
fix: command - always return non-nil command when parsing (fix #27)
To avoid panic when calling pcmd.Error in handlers.parse.
This commit is contained in:
@@ -42,6 +42,8 @@ func TestSetNXParse(t *testing.T) {
|
||||
if err == nil {
|
||||
testx.AssertEqual(t, cmd.key, test.want.key)
|
||||
testx.AssertEqual(t, cmd.value, test.want.value)
|
||||
} else {
|
||||
testx.AssertEqual(t, cmd, test.want)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user