Commit 490747a8 authored by astaxie's avatar astaxie

fix #52

parent d4610a93
......@@ -65,6 +65,7 @@ func init() {
EnableGzip = false
StaticDir["/static"] = "static"
AppConfigPath = path.Join(AppPath, "conf", "app.conf")
ParseConfig()
}
type App struct {
......
......@@ -75,8 +75,8 @@ func LoadConfig(name string) (*Config, error) {
}
val := bytes.SplitN(line, bEqual, 2)
if bytes.HasPrefix(val[1], bDQuote) {
val[1] = bytes.Trim(val[1], `"`)
if bytes.HasPrefix(strings.TrimSpace(string(val[1])), bDQuote) {
val[1] = bytes.Trim(strings.TrimSpace(string(val[1])), `"`)
}
key := strings.TrimSpace(string(val[0]))
......
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