mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 08:50:56 +00:00
Fixed parese ini file with empty space line
This commit is contained in:
parent
2e0bcf611c
commit
e9f967102c
@ -86,11 +86,10 @@ func (ini *IniConfig) parseFile(name string) (*IniConfigContainer, error) {
|
|||||||
if _, ok := err.(*os.PathError); ok {
|
if _, ok := err.(*os.PathError); ok {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
line = bytes.TrimSpace(line)
|
||||||
if bytes.Equal(line, bEmpty) {
|
if bytes.Equal(line, bEmpty) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
line = bytes.TrimSpace(line)
|
|
||||||
|
|
||||||
var bComment []byte
|
var bComment []byte
|
||||||
switch {
|
switch {
|
||||||
case bytes.HasPrefix(line, bNumComment):
|
case bytes.HasPrefix(line, bNumComment):
|
||||||
|
Loading…
Reference in New Issue
Block a user