Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maintenance : Deprecate FCallRo & add FCallRO #2550

Merged
merged 4 commits into from
Apr 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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