mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 18:40:55 +00:00
fix #52
This commit is contained in:
parent
d4610a9313
commit
490747a8ae
1
beego.go
1
beego.go
@ -65,6 +65,7 @@ func init() {
|
|||||||
EnableGzip = false
|
EnableGzip = false
|
||||||
StaticDir["/static"] = "static"
|
StaticDir["/static"] = "static"
|
||||||
AppConfigPath = path.Join(AppPath, "conf", "app.conf")
|
AppConfigPath = path.Join(AppPath, "conf", "app.conf")
|
||||||
|
ParseConfig()
|
||||||
}
|
}
|
||||||
|
|
||||||
type App struct {
|
type App struct {
|
||||||
|
@ -75,8 +75,8 @@ func LoadConfig(name string) (*Config, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
val := bytes.SplitN(line, bEqual, 2)
|
val := bytes.SplitN(line, bEqual, 2)
|
||||||
if bytes.HasPrefix(val[1], bDQuote) {
|
if bytes.HasPrefix(strings.TrimSpace(string(val[1])), bDQuote) {
|
||||||
val[1] = bytes.Trim(val[1], `"`)
|
val[1] = bytes.Trim(strings.TrimSpace(string(val[1])), `"`)
|
||||||
}
|
}
|
||||||
|
|
||||||
key := strings.TrimSpace(string(val[0]))
|
key := strings.TrimSpace(string(val[0]))
|
||||||
|
Loading…
Reference in New Issue
Block a user