HDEL key field [field ...]
(m uhaha.Machine, args []string)
| 72 | return val, nil |
| 73 | } |
| 74 | |
| 75 | // HDEL key field [field ...] |
| 76 | func cmdHDEL(m uhaha.Machine, args []string) (interface{}, error) { |
| 77 | if len(args) < 3 { |
| 78 | return nil, uhaha.ErrWrongNumArgs |
| 79 | } |
| 80 | |
| 81 | var n int64 |
| 82 | argsData := make([][]byte, len(args)-2) |
| 83 | for i := 2; i < len(args); i++ { |
| 84 | argsData[i-2] = []byte(args[i]) |
| 85 | } |
| 86 | |
| 87 | if count, err := ldb.HDel([]byte(args[1]), argsData...); err == nil { |
| 88 | n = count |
| 89 | } |
| 90 | |
| 91 | return redcon.SimpleInt(n), nil |
| 92 | } |
| 93 |
nothing calls this directly
no outgoing calls
no test coverage detected