From b2df72a23d81958127aa1f96bf17ffb5c0dd1561 Mon Sep 17 00:00:00 2001 From: TwinProduction Date: Thu, 22 Oct 2020 22:51:54 -0400 Subject: [PATCH] Refactor useless lines --- commands.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/commands.go b/commands.go index b92d9a9..8a08f61 100644 --- a/commands.go +++ b/commands.go @@ -787,13 +787,7 @@ func (c cmdable) Set(ctx context.Context, key string, value interface{}, expirat // Redis `SETEX key expiration value` command. func (c cmdable) SetEX(ctx context.Context, key string, value interface{}, expiration time.Duration) *StatusCmd { - args := make([]interface{}, 4) - args[0] = "setex" - args[1] = key - args[2] = formatSec(ctx, expiration) - args[3] = value - - cmd := NewStatusCmd(ctx, args...) + cmd := NewStatusCmd(ctx, "setex", key, formatSec(ctx, expiration), value) _ = c(ctx, cmd) return cmd }