1
0
mirror of https://github.com/alexedwards/scs.git synced 2025-07-15 01:04:36 +02:00

Fix typo in Iterate example

This commit is contained in:
Diego Parisi
2021-12-06 18:23:09 +01:00
committed by GitHub
parent 370cc303b6
commit a2ba24921d

View File

@ -251,7 +251,7 @@ To iterate throught all sessions, SCS offers to all data stores an `All()` funct
Essentially, in your code, you pass the `Iterate()` method a closure with the signature `func(ctx context.Context) error` which contains the logic that you want to execute against each session. For example, if you want to revoke all sessions with contain a `userID` value equal to `4` you can do the following:
```go
err := sessionManager.Iterate(func(ctx context.Context) error {
err := sessionManager.Iterate(r.Context(), func(ctx context.Context) error {
userID := sessionManager.GetInt(ctx, "userID")
if userID == 4 {