mirror of
https://gitee.com/XM-GO/PandaX.git
synced 2026-04-23 02:48:34 +08:00
更新kit包
This commit is contained in:
2
go.mod
2
go.mod
@@ -3,7 +3,7 @@ module pandax
|
||||
go 1.19
|
||||
|
||||
require (
|
||||
github.com/PandaXGO/PandaKit v0.0.0-20230914055936-853aa978dda1
|
||||
github.com/PandaXGO/PandaKit v0.0.0-20231013022859-bcaa3c1cd20b
|
||||
github.com/Shopify/sarama v1.38.1
|
||||
github.com/dgrijalva/jwt-go v3.2.0+incompatible
|
||||
github.com/didip/tollbooth v4.0.2+incompatible
|
||||
|
||||
2
go.sum
2
go.sum
@@ -7,6 +7,8 @@ github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030I
|
||||
github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs=
|
||||
github.com/PandaXGO/PandaKit v0.0.0-20230914055936-853aa978dda1 h1:LfDtQriNZcP4Ksx/d2d5kLC4C/SemkMSxQuQZOVuiFw=
|
||||
github.com/PandaXGO/PandaKit v0.0.0-20230914055936-853aa978dda1/go.mod h1:/H1PTodkWhRyVqE/1tROVJEO2nwqwE6el7ZzwSebLxY=
|
||||
github.com/PandaXGO/PandaKit v0.0.0-20231013022859-bcaa3c1cd20b h1:W4avR/i7mBU7pkbyMULaCHGv2BhhHCfSiSt9pF0rbgI=
|
||||
github.com/PandaXGO/PandaKit v0.0.0-20231013022859-bcaa3c1cd20b/go.mod h1:/H1PTodkWhRyVqE/1tROVJEO2nwqwE6el7ZzwSebLxY=
|
||||
github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
|
||||
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
|
||||
github.com/Shopify/sarama v1.38.1 h1:lqqPUPQZ7zPqYlWpTh+LQ9bhYNu2xJL6k1SJN4WVe2A=
|
||||
|
||||
3
main.go
3
main.go
@@ -33,7 +33,6 @@ var rootCmd = &cobra.Command{
|
||||
PreRun: func(cmd *cobra.Command, args []string) {
|
||||
if configFile != "" {
|
||||
global.Conf = config.InitConfig(configFile)
|
||||
log.Println(global.Conf.Log.Level)
|
||||
global.Log = logger.InitLog(global.Conf.Log.File.GetFilename(), global.Conf.Log.Level)
|
||||
dbGorm := starter.DbGorm{Type: global.Conf.Server.DbType}
|
||||
if global.Conf.Server.DbType == "mysql" {
|
||||
@@ -43,7 +42,7 @@ var rootCmd = &cobra.Command{
|
||||
}
|
||||
global.Db = dbGorm.GormInit()
|
||||
global.Log.Infof("%s连接成功", global.Conf.Server.DbType)
|
||||
client, err := rediscli.NewRedisClient(global.Conf.Redis.Host, global.Conf.Redis.Password, global.Conf.Redis.Port)
|
||||
client, err := rediscli.NewRedisClient(global.Conf.Redis.Host, global.Conf.Redis.Password, global.Conf.Redis.Port, global.Conf.Redis.Db)
|
||||
if err != nil {
|
||||
global.Log.Panic("Redis连接错误")
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user