(m uhaha.Machine, args []string)
| 179 | return nil, err |
| 180 | } |
| 181 | return redcon.SimpleInt(0), nil |
| 182 | } |
| 183 | |
| 184 | v, err := ldb.SExpireAt([]byte(args[1]), timestamp) |
| 185 | return redcon.SimpleInt(v), err |
| 186 | } |
| 187 | |
| 188 | func cmdSEXPIREAT(m uhaha.Machine, args []string) (interface{}, error) { |
| 189 | if len(args) != 3 { |
| 190 | return nil, uhaha.ErrWrongNumArgs |
| 191 | } |
| 192 | |
| 193 | timestamp, err := ledis.StrInt64([]byte(args[2]), nil) |
| 194 | if err != nil { |
| 195 | return nil, uhaha.ErrInvalid |
| 196 | } |
| 197 | if timestamp < time.Now().Unix() { |
| 198 | _, err := ldb.SClear([]byte(args[1])) |
| 199 | if err != nil { |
| 200 | return nil, err |
| 201 | } |
| 202 | return redcon.SimpleInt(0), nil |
| 203 | } |
nothing calls this directly
no outgoing calls
no test coverage detected