diff --git a/go.mod b/go.mod index 93b1f5c..b73653f 100644 --- a/go.mod +++ b/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 diff --git a/go.sum b/go.sum index 38b4287..b606a39 100644 --- a/go.sum +++ b/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= diff --git a/main.go b/main.go index 07679c1..5f68ebd 100644 --- a/main.go +++ b/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 {