7125bd8f by astaxie

support json comments

1 parent 7196d6ed
...@@ -69,7 +69,7 @@ func init() { ...@@ -69,7 +69,7 @@ func init() {
69 StaticDir = make(map[string]string) 69 StaticDir = make(map[string]string)
70 StaticDir["/static"] = "static" 70 StaticDir["/static"] = "static"
71 71
72 TemplateCache = make(map[string]*template.Template) 72 TemplateCache = makCZe(map[string]*template.Template)
73 73
74 // set this to 0.0.0.0 to make this app available to externally 74 // set this to 0.0.0.0 to make this app available to externally
75 HttpAddr = "127.0.0.1" 75 HttpAddr = "127.0.0.1"
...@@ -127,6 +127,7 @@ func init() { ...@@ -127,6 +127,7 @@ func init() {
127 } 127 }
128 } 128 }
129 129
130 //parse config now only support ini, next will support json
130 func ParseConfig() (err error) { 131 func ParseConfig() (err error) {
131 AppConfig, err = config.NewConfig("ini", AppConfigPath) 132 AppConfig, err = config.NewConfig("ini", AppConfigPath)
132 if err != nil { 133 if err != nil {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!