Skip to content

Avoid using panic in Redis Commands  #2834

Open
@ofekshenawa

Description

@ofekshenawa

In various functions within the go-redis library, there is a use of panic to handle cases.
Using panic for this purpose is not in line with Go's idiomatic error handling and can result in unexpected program termination.

Suggested Improvement:
Replace occurrences of panic with a more idiomatic error return approach. This allows users to handle argument validation errors gracefully through error checks and aligns with Go's standard error handling practices.

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