Skip to content

Commit

Permalink
apply code review formatting feedback
Browse files Browse the repository at this point in the history
Signed-off-by: jbrinkman <[email protected]>
  • Loading branch information
jbrinkman committed Jan 6, 2025
1 parent 3f79bc5 commit 7564c80
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
3 changes: 1 addition & 2 deletions go/api/response_handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -418,8 +418,7 @@ func handleKeyWithMemberAndScoreResponse(response *C.struct_CommandResponse) (Re
key := arr[0].(string)
member := arr[1].(string)
score := arr[2].(float64)
kms := KeyWithMemberAndScore{key, member, score}
return CreateKeyWithMemberAndScoreResult(KeyWithMemberAndScore{arr[0].(string), arr[1].(string), arr[2].(float64)}), nil
return CreateKeyWithMemberAndScoreResult(KeyWithMemberAndScore{key, member, score}), nil
}

func handleScanResponse(
Expand Down
7 changes: 5 additions & 2 deletions go/api/response_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@ type Result[T any] struct {
isNil bool
}

// KeyWithMemberAndScore is used by BZPOPMIN/BZPOPMAX, which return an object consisting of the key of the sorted set that was
// popped, the popped member, and its score.
type KeyWithMemberAndScore struct {
Key, Member string
Score float64
Key string
Member string
Score float64
}

func (result Result[T]) IsNil() bool {
Expand Down
6 changes: 3 additions & 3 deletions go/integTest/shared_commands_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4140,9 +4140,9 @@ func (suite *GlideTestSuite) TestZincrBy() {

func (suite *GlideTestSuite) TestBZPopMin() {
suite.runWithDefaultClients(func(client api.BaseClient) {
key1 := "{listKey}-1-" + uuid.NewString()
key2 := "{listKey}-2-" + uuid.NewString()
key3 := "{listKey}-2-" + uuid.NewString()
key1 := "{zset}-1-" + uuid.NewString()
key2 := "{zset}-2-" + uuid.NewString()
key3 := "{zset}-2-" + uuid.NewString()

// Add elements to key1
zaddResult1, err := client.ZAdd(key1, map[string]float64{"a": 1.0, "b": 1.5})
Expand Down

0 comments on commit 7564c80

Please sign in to comment.