Revel v0.21.0 release
New items
- Session Engine support You can now define your own session engine. By default the cookie engine is the one used for the session, but with this change you can implement your own. Also controller.Session is now a
map[string]interface{}which means you can place any object that can be serialized to a string. - Added http mux support you can now integrate Revel with packages that have their own HTTP muxers. This allows you to integrate with Hugo, Swagger or any suite of software that is out there.
revel.controller.reuseapp.conf option to turn on / off reuse of the controllers. Defaults to true
Breaking changes
controller.Session is now a map[string]interface{} (previously was map[string]string) this means existing code needs to cast any values they pull from the session
if username, ok := c.Session["user"]; ok { // username is a string type
return c.getUser(username)
}
changes to
if username, ok := c.Session["user"]; ok { // username is an interface{} type
return c.getUser(username.(string))
}
Deprecated log points removed revel.ERROR, revel.TRACE, revel.DEBUG, revel.WARN have been removed