123456789101112131415161718192021222324252627 |
- package utils
- import (
- beeLogger "github.com/beego/bee/v2/logger"
- "github.com/beego/beego/v2/server/web"
- )
- var (
- RunMode string //运行模式
- MYSQL_URL string //数据库连接
- )
- func init() {
- tmpRunMode, err := web.AppConfig.String("run_mode")
- if err != nil {
- panic("配置文件读取run_mode错误 " + err.Error())
- }
- RunMode = tmpRunMode
- beeLogger.Log.Info(RunMode + " 模式")
- if RunMode == "release" {
- } else {
- }
- }
|