Skip to content

Commit

Permalink
Maintenance : Deprecate FCallRo & add FCallRO (#2550)
Browse files Browse the repository at this point in the history
* Deprecated FCallRo

* feat: FCallRo to FCallRO

Signed-off-by: monkey92t <golang@88.com>

* update doc

Signed-off-by: monkey92t <golang@88.com>

---------

Signed-off-by: monkey92t <golang@88.com>
Co-authored-by: Anuragkillswitch <70265851+Anuragkillswitch@users.noreply.github.com>
Co-authored-by: monkey92t <golang@88.com>
  • Loading branch information
3 people authored Apr 17, 2023
1 parent 0d860cb commit d7c6c35
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit d7c6c35

Please sign in to comment.