Skip to content

zset member returned as an interface type instead of a string and is not type-safe #2817

Open
@Aden-Q

Description

@Aden-Q

Expected Behavior

According to the redis doc, zset members should always be strings. We want zset members to be returned as strings so that we don't have to do type assertion explicitly.

Current Behavior

zset member is returned as an interface:

Member interface{}

Possible Solution

Define the Z struct's member field as a string type:

type Z struct {
Score float64
Member interface{}
}

Steps to Reproduce

Context (Environment)

Detailed Description

Possible Implementation

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions