Skip to content

Commit

Permalink
refactor: refactor codebase to improve performance and maintainability
Browse files Browse the repository at this point in the history
- Remove redundant variable redeclaration of `cookies` in `TestRediStore` function

Signed-off-by: Bo-Yi Wu <[email protected]>
  • Loading branch information
appleboy committed Jan 17, 2025
1 parent db15027 commit d2d81ad
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions redistore_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ func TestRediStore(t *testing.T) {
t.Fatalf("Error saving session: %v", err)
}
hdr := rsp.Header()
cookies, ok := hdr["Set-Cookie"]
cookies, ok = hdr["Set-Cookie"]
if !ok || len(cookies) != 1 {
t.Fatalf("No cookies. Header: %s", hdr)
}
Expand Down Expand Up @@ -279,7 +279,7 @@ func TestRediStore(t *testing.T) {
t.Fatalf("Error saving session: %v", err)
}
hdr := rsp.Header()
cookies, ok := hdr["Set-Cookie"]
cookies, ok = hdr["Set-Cookie"]
if !ok || len(cookies) != 1 {
t.Fatalf("No cookies. Header: %s", hdr)
}
Expand Down Expand Up @@ -322,7 +322,7 @@ func TestRediStore(t *testing.T) {
t.Fatalf("Error saving session: %v", err)
}
hdr := rsp.Header()
cookies, ok := hdr["Set-Cookie"]
cookies, ok = hdr["Set-Cookie"]
if !ok || len(cookies) != 1 {
t.Fatalf("No cookies. Header: %s", hdr)
}
Expand Down

0 comments on commit d2d81ad

Please sign in to comment.