Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Why does the go redis/v8 version function input must have a context type? #1694

Closed
MrGlp opened this issue Mar 13, 2021 · 1 comment
Closed

Comments

@MrGlp
Copy link

MrGlp commented Mar 13, 2021

Why does the go redis/v8 version function input must have a context type?
example: go redis/v8
func (c cmdable) Set(ctx context.Context, key string, value interface{}, expiration time.Duration) *StatusCmd {...}

but go redis does not
example: go redis
func (c cmdable) Set(key string, value interface{}, expiration time.Duration) *StatusCmd {...}

What is the difference and impact on use?

@vmihailenco
Copy link
Collaborator

context.Context is mainly used for canceling operations and tracing. It is a general Go feature so you should be able to google more info if needed.

@redis redis locked and limited conversation to collaborators Mar 14, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants