mirror of
https://github.com/astaxie/beego.git
synced 2024-11-26 03:11:30 +00:00
enhancement code
This commit is contained in:
parent
d9e6250d08
commit
330b3b1931
@ -20,6 +20,7 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"errors"
|
||||||
|
|
||||||
"github.com/astaxie/beego/config"
|
"github.com/astaxie/beego/config"
|
||||||
"github.com/astaxie/beego/session"
|
"github.com/astaxie/beego/session"
|
||||||
@ -313,6 +314,11 @@ func LoadAppConfig(configPath string, adapterName string) error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if !utils.FileExists(absConfigPath) {
|
||||||
|
return errors.New(fmt.Sprintf("the target config file: %s don't exist!", configPath))
|
||||||
|
}
|
||||||
|
|
||||||
if absConfigPath == AppConfigPath {
|
if absConfigPath == AppConfigPath {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user