Skip to content

Commit

Permalink
fixed ineffassign
Browse files Browse the repository at this point in the history
fixed ineffassign
  • Loading branch information
werbenhu committed Apr 25, 2023
1 parent 5acbdf6 commit 1dbc93e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion chash_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ func TestCHashMatch(t *testing.T) {
group, err := hash.CreateGroup("test", 10000)
assert.Nil(t, err)

key, payload, err = hash.Match("test", "werbenhuxxxxx")
_, _, err = hash.Match("test", "werbenhuxxxxx")
assert.NotNil(t, err)
assert.Equal(t, ErrNoResultMatched, err)

Expand Down
4 changes: 2 additions & 2 deletions group_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func TestGroupDelete(t *testing.T) {

func TestGroupMatch(t *testing.T) {
group := NewGroup("test", 10000)
key, payload, err := group.Match("werbenhuxxxxx")
_, _, err := group.Match("werbenhuxxxxx")
assert.NotNil(t, err)
assert.Equal(t, ErrNoResultMatched, err)

Expand All @@ -96,7 +96,7 @@ func TestGroupMatch(t *testing.T) {
assert.Equal(t, 10000, len(group.rows))
assert.Equal(t, 1, len(group.Elements))

key, payload, err = group.Match("werbenhuxxxxx")
key, payload, err := group.Match("werbenhuxxxxx")
assert.Nil(t, err)
assert.NotNil(t, payload)
assert.NotEqual(t, key, "")
Expand Down

0 comments on commit 1dbc93e

Please sign in to comment.