1
Some checks failed
Build / build (push) Has been cancelled
CodeQL / Analyze (go) (push) Has been cancelled
build / Build (push) Has been cancelled
GitHub Actions Mirror / mirror_to_gitee (push) Has been cancelled
GitHub Actions Mirror / mirror_to_gitlab (push) Has been cancelled
Issue Close Require / issue-close-require (push) Has been cancelled
Some checks failed
Build / build (push) Has been cancelled
CodeQL / Analyze (go) (push) Has been cancelled
build / Build (push) Has been cancelled
GitHub Actions Mirror / mirror_to_gitee (push) Has been cancelled
GitHub Actions Mirror / mirror_to_gitlab (push) Has been cancelled
Issue Close Require / issue-close-require (push) Has been cancelled
This commit is contained in:
@ -35,6 +35,7 @@ import (
|
||||
"go-admin/common/storage"
|
||||
ext "go-admin/config"
|
||||
"go-admin/utils/redishelper"
|
||||
"go-admin/utils/utility"
|
||||
)
|
||||
|
||||
var (
|
||||
@ -177,6 +178,9 @@ func run() error {
|
||||
}
|
||||
|
||||
func initCommon() {
|
||||
//初始化雪花算法
|
||||
utility.InitSnowflake()
|
||||
|
||||
redishelper.InitDefaultRedis(config.CacheConfig.Redis.Addr, config.CacheConfig.Redis.Password, config.CacheConfig.Redis.DB)
|
||||
|
||||
if err := redishelper.DefaultRedis.Ping(); err != nil {
|
||||
@ -195,6 +199,7 @@ func initCommon() {
|
||||
|
||||
os.Exit(-1)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var Router runtime.Router
|
||||
|
||||
Reference in New Issue
Block a user