minor comment updates for sessions package

Former-commit-id: 6f73c5d83861a1f61acda07e7f78cb882320dc8c
This commit is contained in:
Gerasimos (Makis) Maropoulos 2017-12-24 19:43:31 +02:00
parent 042603c311
commit 4ab889da5f
3 changed files with 4 additions and 4 deletions

View File

@ -22,8 +22,8 @@ Some trivial examples,
```go ```go
import "github.com/kataras/iris/sessions" import "github.com/kataras/iris/sessions"
sess := sessions.Start(http.ResponseWriter, *http.Request) manager := sessions.Start(iris.Context)
sess. manager.
ID() string ID() string
Get(string) interface{} Get(string) interface{}
HasFlash() bool HasFlash() bool

View File

@ -89,5 +89,5 @@ func main() {
sess.ShiftExpiration(ctx) sess.ShiftExpiration(ctx)
}) })
app.Run(iris.Addr(":8080"), iris.WithoutServerError(iris.ErrServerClosed), iris.WithoutVersionChecker) app.Run(iris.Addr(":8080"))
} }

View File

@ -369,7 +369,7 @@ func (s *Session) set(key string, value interface{}, immutable bool) {
syncDatabases(s.provider.databases, p) syncDatabases(s.provider.databases, p)
} }
// Set fills the session with an entry"value", based on its "key". // Set fills the session with an entry "value", based on its "key".
func (s *Session) Set(key string, value interface{}) { func (s *Session) Set(key string, value interface{}) {
s.set(key, value, false) s.set(key, value, false)
} }