Commit 45710c3a authored by xiemengjun's avatar xiemengjun

add TemplateCache

parent 8e90ddd5
......@@ -4,6 +4,7 @@ import (
"fmt"
"github.com/astaxie/session"
_ "github.com/astaxie/session/providers/memory"
"html/template"
"net/http"
"os"
"path"
......@@ -15,6 +16,7 @@ var (
AppName string
AppPath string
StaticDir map[string]string
TemplateCache map[string]*template.Template
HttpAddr string
HttpPort int
RecoverPanic bool
......@@ -36,6 +38,7 @@ func init() {
BeeApp = NewApp()
AppPath, _ = os.Getwd()
StaticDir = make(map[string]string)
TemplateCache = make(map[string]*template.Template)
var err error
AppConfig, err = LoadConfig(path.Join(AppPath, "conf", "app.conf"))
if err != nil {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment