Skip to content

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

Closed
@MrGlp

Description

@MrGlp

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions