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

ignore parse include config file error

This commit is contained in:
ysqi 2016-02-14 18:55:42 +08:00
parent d5f07d65bb
commit 891016a0a2

View File

@ -21,6 +21,7 @@ import (
"fmt"
"io"
"io/ioutil"
"log"
"os"
"path"
"strconv"
@ -134,7 +135,9 @@ func (ini *IniConfig) parseFile(name string) (*IniConfigContainer, error) {
}
i, err := ini.parseFile(otherfile)
if err != nil {
return nil, err
// ignore error
log.Printf("[warn] handle config %q error, %s \n", key, err.Error())
continue
}
for sec, dt := range i.data {
if _, ok := cfg.data[sec]; !ok {