ref: cc4801d0bfe1451160608ac5d8e94e9b2f68cc16
dir: /messages.go/
package plugins import ( "github.com/olmaxmedical/router" ) // Messages - list all messages by key for use in a message template const Messages router.PluginMask = 1 << 9 func init() { b := &router.Plugin{ Name: "messages", Run: GetMessages, Validate: nil, } router.AddPlugin(b, Messages) } // GetMessages - return a map of message structs func GetMessages(r *router.Request) map[string]interface{} { s := r.Session() if s == nil { return nil } return map[string]interface{}{ // No, this won't actually do anything. "messages": s.Get("messages"), } }