(m uhaha.Machine, args []string)
| 108 | |
| 109 | return redcon.SimpleInt(n), nil |
| 110 | } |
| 111 | |
| 112 | func cmdHGETALL(m uhaha.Machine, args []string) (interface{}, error) { |
| 113 | if len(args) != 2 { |
| 114 | return nil, uhaha.ErrWrongNumArgs |
| 115 | } |
| 116 | |
| 117 | v, err := ldb.HGetAll([]byte(args[1])) |
| 118 | if err != nil { |
| 119 | return nil, err |
| 120 | } |
| 121 | |
| 122 | dataMap := make(map[string]string) |
| 123 | for _, kv := range v { |
| 124 | dataMap[string(kv.Field)] = string(kv.Value) |
| 125 | } |
| 126 | |
| 127 | return dataMap, nil |
| 128 | } |
| 129 |
nothing calls this directly
no outgoing calls
no test coverage detected