mirror of
https://github.com/astaxie/beego.git
synced 2024-11-29 19:01:29 +00:00
ignore parse include config file error
This commit is contained in:
parent
d5f07d65bb
commit
891016a0a2
@ -21,6 +21,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
|
"log"
|
||||||
"os"
|
"os"
|
||||||
"path"
|
"path"
|
||||||
"strconv"
|
"strconv"
|
||||||
@ -134,7 +135,9 @@ func (ini *IniConfig) parseFile(name string) (*IniConfigContainer, error) {
|
|||||||
}
|
}
|
||||||
i, err := ini.parseFile(otherfile)
|
i, err := ini.parseFile(otherfile)
|
||||||
if err != nil {
|
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 {
|
for sec, dt := range i.data {
|
||||||
if _, ok := cfg.data[sec]; !ok {
|
if _, ok := cfg.data[sec]; !ok {
|
||||||
|
Loading…
Reference in New Issue
Block a user