From d7c6c3598b73af7f5b74c376237965c04fd43073 Mon Sep 17 00:00:00 2001 From: Anurag Bandyopadhyay Date: Mon, 17 Apr 2023 22:48:06 +0530 Subject: [PATCH] Maintenance : Deprecate FCallRo & add FCallRO (#2550) * Deprecated FCallRo * feat: FCallRo to FCallRO Signed-off-by: monkey92t * update doc Signed-off-by: monkey92t --------- Signed-off-by: monkey92t Co-authored-by: Anuragkillswitch <70265851+Anuragkillswitch@users.noreply.github.com> Co-authored-by: monkey92t --- commands.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/commands.go b/commands.go index c9b2af29..c94ccdfe 100644 --- a/commands.go +++ b/commands.go @@ -451,6 +451,7 @@ type Cmdable interface { FunctionStats(ctx context.Context) *FunctionStatsCmd FCall(ctx context.Context, function string, keys []string, args ...interface{}) *Cmd FCallRo(ctx context.Context, function string, keys []string, args ...interface{}) *Cmd + FCallRO(ctx context.Context, function string, keys []string, args ...interface{}) *Cmd Publish(ctx context.Context, channel string, message interface{}) *IntCmd SPublish(ctx context.Context, channel string, message interface{}) *IntCmd @@ -3495,7 +3496,14 @@ func (c cmdable) FCall(ctx context.Context, function string, keys []string, args _ = c(ctx, cmd) return cmd } + +// FCallRo this function simply calls FCallRO, +// Deprecated: to maintain convention FCallRO. func (c cmdable) FCallRo(ctx context.Context, function string, keys []string, args ...interface{}) *Cmd { + return c.FCallRO(ctx, function, keys, args...) +} + +func (c cmdable) FCallRO(ctx context.Context, function string, keys []string, args ...interface{}) *Cmd { cmdArgs := fcallArgs("fcall_ro", function, keys, args...) cmd := NewCmd(ctx, cmdArgs...) if len(keys) > 0 {