move templateFuncs to one file, add middleware context.
This commit is contained in:
parent
06deed820d
commit
fa5ad1e465
10 changed files with 173 additions and 95 deletions
|
@ -4,17 +4,9 @@
|
|||
|
||||
package base
|
||||
|
||||
import (
|
||||
"github.com/codegangsta/martini"
|
||||
)
|
||||
import ()
|
||||
|
||||
type (
|
||||
// Type TmplData represents data in the templates.
|
||||
TmplData map[string]interface{}
|
||||
)
|
||||
|
||||
func InitContext() martini.Handler {
|
||||
return func(context martini.Context) {
|
||||
context.Map(TmplData{})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue