(_ uhaha.Machine, args []string)
| 19 | } |
| 20 | |
| 21 | func cmdFLUSHALL(_ uhaha.Machine, args []string) (interface{}, error) { |
| 22 | if len(args) != 1 { |
| 23 | return nil, uhaha.ErrWrongNumArgs |
| 24 | } |
| 25 | n, err := ldb.FlushAll() |
| 26 | if err != nil { |
| 27 | return nil, err |
| 28 | } |
| 29 | return redcon.SimpleInt(n), nil |
| 30 | } |
| 31 | |
| 32 | func cmdFLUSHDB(_ uhaha.Machine, args []string) (interface{}, error) { |
| 33 | return cmdFLUSHALL(nil, args) |