Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
beego
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
beego
Commits
45710c3a
Commit
45710c3a
authored
Jan 06, 2013
by
xiemengjun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add TemplateCache
parent
8e90ddd5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
12 deletions
+15
-12
beego.go
beego.go
+15
-12
No files found.
beego.go
View file @
45710c3a
...
@@ -4,6 +4,7 @@ import (
...
@@ -4,6 +4,7 @@ import (
"fmt"
"fmt"
"github.com/astaxie/session"
"github.com/astaxie/session"
_
"github.com/astaxie/session/providers/memory"
_
"github.com/astaxie/session/providers/memory"
"html/template"
"net/http"
"net/http"
"os"
"os"
"path"
"path"
...
@@ -11,18 +12,19 @@ import (
...
@@ -11,18 +12,19 @@ import (
)
)
var
(
var
(
BeeApp
*
App
BeeApp
*
App
AppName
string
AppName
string
AppPath
string
AppPath
string
StaticDir
map
[
string
]
string
StaticDir
map
[
string
]
string
HttpAddr
string
TemplateCache
map
[
string
]
*
template
.
Template
HttpPort
int
HttpAddr
string
RecoverPanic
bool
HttpPort
int
AutoRender
bool
RecoverPanic
bool
PprofOn
bool
AutoRender
bool
ViewsPath
string
PprofOn
bool
RunMode
string
//"dev" or "prod"
ViewsPath
string
AppConfig
*
Config
RunMode
string
//"dev" or "prod"
AppConfig
*
Config
//related to session
//related to session
SessionOn
bool
// wheather auto start session,default is false
SessionOn
bool
// wheather auto start session,default is false
SessionProvider
string
// default session provider memory
SessionProvider
string
// default session provider memory
...
@@ -36,6 +38,7 @@ func init() {
...
@@ -36,6 +38,7 @@ func init() {
BeeApp
=
NewApp
()
BeeApp
=
NewApp
()
AppPath
,
_
=
os
.
Getwd
()
AppPath
,
_
=
os
.
Getwd
()
StaticDir
=
make
(
map
[
string
]
string
)
StaticDir
=
make
(
map
[
string
]
string
)
TemplateCache
=
make
(
map
[
string
]
*
template
.
Template
)
var
err
error
var
err
error
AppConfig
,
err
=
LoadConfig
(
path
.
Join
(
AppPath
,
"conf"
,
"app.conf"
))
AppConfig
,
err
=
LoadConfig
(
path
.
Join
(
AppPath
,
"conf"
,
"app.conf"
))
if
err
!=
nil
{
if
err
!=
nil
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment