cmdEXPIREAT sets an expiration timestamp for a key.
(m uhaha.Machine, args []string)
| 67 | } |
| 68 | |
| 69 | // cmdEXPIREAT sets an expiration timestamp for a key. |
| 70 | func cmdEXPIREAT(m uhaha.Machine, args []string) (interface{}, error) { |
| 71 | if len(args) != 3 { |
| 72 | return nil, uhaha.ErrWrongNumArgs |
| 73 | } |
| 74 | |
| 75 | timestamp, err := ledis.StrInt64([]byte(args[2]), nil) |
| 76 | if err != nil { |
| 77 | return nil, fmt.Errorf("ERR invalid timestamp: %v", err) |
| 78 | } |
| 79 | |
| 80 | return handleExpiration([]byte(args[1]), timestamp) |
| 81 | } |
| 82 | |
| 83 | // cmdEXPIRE sets an expiration time for a key. |
nothing calls this directly
no test coverage detected