123456789101112131415 |
- package utils
-
- import (
- "github.com/astaxie/beego/config"
- )
-
- // GetConfiger 获取配置
- func GetConfiger(file string) (config.Configer, error) {
- conf, err := config.NewConfig("ini", file)
- if err != nil {
- return nil, LogError("读取配置文件失败", err.Error())
- }
-
- return conf, nil
- }
|