mirror of
https://github.com/astaxie/beego.git
synced 2024-12-22 16:20:50 +00:00
fix bug
This commit is contained in:
parent
490747a8ae
commit
c048efbbf8
@ -75,8 +75,8 @@ func LoadConfig(name string) (*Config, error) {
|
||||
}
|
||||
|
||||
val := bytes.SplitN(line, bEqual, 2)
|
||||
if bytes.HasPrefix(strings.TrimSpace(string(val[1])), bDQuote) {
|
||||
val[1] = bytes.Trim(strings.TrimSpace(string(val[1])), `"`)
|
||||
if bytes.HasPrefix([]byte(strings.TrimSpace(string(val[1]))), bDQuote) {
|
||||
val[1] = bytes.Trim([]byte(strings.TrimSpace(string(val[1]))), `"`)
|
||||
}
|
||||
|
||||
key := strings.TrimSpace(string(val[0]))
|
||||
|
Loading…
Reference in New Issue
Block a user