Skip to content

Commit

Permalink
delete context.Clear and dependency to gorilla/context
Browse files Browse the repository at this point in the history
  • Loading branch information
KeiichiHirobe committed Mar 19, 2022
1 parent 908c56e commit 03fd673
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 5 deletions.
1 change: 0 additions & 1 deletion go.mod
Expand Up @@ -10,7 +10,6 @@ require (
github.com/gin-gonic/gin v1.7.4
github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8
github.com/gomodule/redigo v2.0.0+incompatible
github.com/gorilla/context v1.1.1
github.com/gorilla/sessions v1.2.0
github.com/kidstuff/mongostore v0.0.0-20181113001930-e650cd85ee4b
github.com/lib/pq v1.10.3 // indirect
Expand Down
1 change: 0 additions & 1 deletion go.sum
Expand Up @@ -28,7 +28,6 @@ github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaW
github.com/gomodule/redigo v2.0.0+incompatible h1:K/R+8tc58AaqLkqG2Ol3Qk+DR/TlNuhuh457pBFPtt0=
github.com/gomodule/redigo v2.0.0+incompatible/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/gorilla/context v1.1.1 h1:AWwleXJkX/nhcU9bZSnZoi3h/qGYqQAGhq6zZe/aQW8=
github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg=
github.com/gorilla/securecookie v1.1.1 h1:miw7JPhV+b/lAHSXz4qd/nN9jRiAFV5FwjeKyCS8BvQ=
github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4=
Expand Down
3 changes: 0 additions & 3 deletions sessions.go
Expand Up @@ -5,7 +5,6 @@ import (
"net/http"

"github.com/gin-gonic/gin"
"github.com/gorilla/context"
"github.com/gorilla/sessions"
)

Expand Down Expand Up @@ -50,7 +49,6 @@ func Sessions(name string, store Store) gin.HandlerFunc {
return func(c *gin.Context) {
s := &session{name, c.Request, store, nil, false, c.Writer}
c.Set(DefaultKey, s)
defer context.Clear(c.Request)
c.Next()
}
}
Expand All @@ -62,7 +60,6 @@ func SessionsMany(names []string, store Store) gin.HandlerFunc {
sessions[name] = &session{name, c.Request, store, nil, false, c.Writer}
}
c.Set(DefaultKey, sessions)
defer context.Clear(c.Request)
c.Next()
}
}
Expand Down

0 comments on commit 03fd673

Please sign in to comment.