Skip to content

Commit b2df72a

Browse files
committed
Refactor useless lines
1 parent cc71f5d commit b2df72a

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

commands.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -787,13 +787,7 @@ func (c cmdable) Set(ctx context.Context, key string, value interface{}, expirat
787787

788788
// Redis `SETEX key expiration value` command.
789789
func (c cmdable) SetEX(ctx context.Context, key string, value interface{}, expiration time.Duration) *StatusCmd {
790-
args := make([]interface{}, 4)
791-
args[0] = "setex"
792-
args[1] = key
793-
args[2] = formatSec(ctx, expiration)
794-
args[3] = value
795-
796-
cmd := NewStatusCmd(ctx, args...)
790+
cmd := NewStatusCmd(ctx, "setex", key, formatSec(ctx, expiration), value)
797791
_ = c(ctx, cmd)
798792
return cmd
799793
}

0 commit comments

Comments
 (0)