1
0
mirror of https://github.com/astaxie/beego.git synced 2024-12-22 17:20:50 +00:00

Fixed parese ini file with empty space line

This commit is contained in:
ysqi 2016-06-01 19:58:35 +08:00
parent 2e0bcf611c
commit e9f967102c

View File

@ -86,11 +86,10 @@ func (ini *IniConfig) parseFile(name string) (*IniConfigContainer, error) {
if _, ok := err.(*os.PathError); ok {
return nil, err
}
line = bytes.TrimSpace(line)
if bytes.Equal(line, bEmpty) {
continue
}
line = bytes.TrimSpace(line)
var bComment []byte
switch {
case bytes.HasPrefix(line, bNumComment):