mirror of
https://github.com/kataras/iris.git
synced 2025-12-21 03:47:04 +00:00
remove the old 'mvc' folder - examples are not changed yet - add the 'di' package inside the mvc2 package - which will be renamed to 'mvc' on the next commit - new mvc.Application and some dublications removed - The new version will be version 9 because it will contain breaking changes (not to the end-developer's controllers but to the API they register them) - get ready for 'Christmas Edition' for believers
Former-commit-id: c7114233dee90ee308c0a3e77ec2ad0c361094b8
This commit is contained in:
17
mvc2/session.go
Normal file
17
mvc2/session.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package mvc2
|
||||
|
||||
import (
|
||||
"github.com/kataras/iris/context"
|
||||
"github.com/kataras/iris/sessions"
|
||||
)
|
||||
|
||||
// Session -> TODO: think of move all bindings to
|
||||
// a different folder like "bindings"
|
||||
// so it will be used as .Bind(bindings.Session(manager))
|
||||
// or let it here but change the rest of the binding names as well
|
||||
// because they are not "binders", their result are binders to be percise.
|
||||
func Session(sess *sessions.Sessions) func(context.Context) *sessions.Session {
|
||||
return func(ctx context.Context) *sessions.Session {
|
||||
return sess.Start(ctx)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user