mirror of https://github.com/go-redis/redis.git
Refactor useless lines
This commit is contained in:
parent
cc71f5d293
commit
b2df72a23d
|
@ -787,13 +787,7 @@ func (c cmdable) Set(ctx context.Context, key string, value interface{}, expirat
|
||||||
|
|
||||||
// Redis `SETEX key expiration value` command.
|
// Redis `SETEX key expiration value` command.
|
||||||
func (c cmdable) SetEX(ctx context.Context, key string, value interface{}, expiration time.Duration) *StatusCmd {
|
func (c cmdable) SetEX(ctx context.Context, key string, value interface{}, expiration time.Duration) *StatusCmd {
|
||||||
args := make([]interface{}, 4)
|
cmd := NewStatusCmd(ctx, "setex", key, formatSec(ctx, expiration), value)
|
||||||
args[0] = "setex"
|
|
||||||
args[1] = key
|
|
||||||
args[2] = formatSec(ctx, expiration)
|
|
||||||
args[3] = value
|
|
||||||
|
|
||||||
cmd := NewStatusCmd(ctx, args...)
|
|
||||||
_ = c(ctx, cmd)
|
_ = c(ctx, cmd)
|
||||||
return cmd
|
return cmd
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue