(m uhaha.Machine, args []string)
| 36 | } |
| 37 | |
| 38 | func cmdHSET(m uhaha.Machine, args []string) (interface{}, error) { |
| 39 | if len(args) < 3 || (len(args))%2 != 0 { |
| 40 | return nil, uhaha.ErrWrongNumArgs |
| 41 | } |
| 42 | |
| 43 | var n int64 |
| 44 | for i := 2; i < len(args); i += 2 { |
| 45 | if r, err := ldb.HSet([]byte(args[1]), []byte(args[i]), []byte(args[i+1])); err == nil { |
| 46 | n = n + r |
| 47 | } |
| 48 | } |
| 49 | |
| 50 | return redcon.SimpleInt(n), nil |
| 51 | } |
| 52 | |
| 53 | func cmdHGET(m uhaha.Machine, args []string) (interface{}, error) { |
| 54 | if len(args) != 3 { |
nothing calls this directly
no outgoing calls
no test coverage detected